GHSA-gjjc-pcwp-c74m OneUptime has WebAuthn 2FA bypass: server accepts client-supplied challenge instead of server-stored value, allowing credential replay
SummaryThe WebAuthn authentication implementation does not store the challenge on the server side. Instead, the challenge is returned to the client and accepted back from the client request body during verification. This violates the WebAuthn specification ([W3C Web Authentication Level 2, §13.4.3](https://www.w3.org/TR/webauthn-2/#sctn-cryptographic-challenges)) and allows an attacker who has obtained a valid WebAuthn assertion (e.g., via XSS, MitM, or log exposure) to replay it indefinitely, completely bypassing the second-factor authentication.DetailsDuring WebAuthn authentication, the server generates a random challenge via `generateAuthenticationOptions()` in `Common/Server/Services/UserWebAuthnService.ts` (line 164-221). However, the challenge is **only returned to the client** and **never stored in a session or database** on the server side.When the client submits the authentication response, the server reads the `expectedChallenge` directly from the untrusted request body (`Authentication.ts:1042`):The `verifyAuthentication()` method then passes this client-provided challenge to `@simplewebauthn/server`'s `verifyAuthenticationResponse()` as `expectedChallenge` (`UserWebAuthnService.ts:268-270`):Since both the `expectedChallenge` (from request body) and the challenge embedded in the credential's `clientDataJSON` originate from the same captured assertion, they will always match. The cryptographic signature also remains valid because it was signed by the legitimate user's authenticator.**Correct flow vs. OneUptime's flow:**| Step | Correct WebAuthn | OneUptime |
|------|-----------------|-----------|
| 1. Generate challenge | Server generates random challenge | Same |
| 2. Store challenge | **Saved in session/DB** | **Not saved anywhere** |
| 3. Send to client | Sent to client | Same |
| 4. Authenticator signs | Authenticator signs challenge | Same |
| 5. Client returns | Returns signed credential | Returns credential **+ challenge** |
| 6. Verify | Compares against **server-stored** value | Compares against **client-provided** value |
| Result | Replay-proof | **Replayable** |PoC**Prerequisites:**An attacker has obtained the victim's password (e.g., credential stuffing, phishing)An attacker has captured a valid WebAuthn assertion from the victim (e.g., via XSS on a OneUptime page, network interception, or log leakage)**Steps to reproduce:****Capture a valid WebAuthn assertion.**
Intercept or extract a legitimate authentication request containing `challenge` and `credential` fields. For example, by injecting JavaScript via stored XSS in a Mermaid diagram on a status page (related vulnerability):**Replay the captured assertion at any later time.**
Send the following request with the victim's email, password, and the captured challenge + credential:**Result:** The server accepts the authentication. The `expectedChallenge` (from the request body) matches the challenge in `clientDataJSON` (from the same captured assertion), and the signature is valid (signed by the real user's key). A session token is returned, granting full access to the victim's account.The attacker bypasses WebAuthn 2FA without possessing the victim's authenticator device.Impact**WebAuthn 2FA is rendered ineffective.** The entire purpose of WebAuthn as a second factor is to protect accounts when passwords are compromised. This vulnerability means that once an attacker has both the password and a single captured assertion, they can authenticate as the victim indefinitely — the assertion never expires because there is no server-side challenge state to invalidate.**Who is impacted:** Any OneUptime user who has enrolled WebAuthn/Passkey as their second factor. The 2FA protection they rely on provides no meaningful security against an attacker who has obtained their password and intercepted one authentication exchange.**Attack chain potential:** This vulnerability can be chained with:Stored XSS (e.g., via Mermaid rendering in status pages) to capture assertionsAbsence of rate limiting on authentication endpoints to obtain passwords via credential stuffingUser enumeration via differential error messages to identify valid targets
CVSS v3.1 score: 8.2