Summary
OneUptime's WebAuthn-based second-factor authentication fails to store and validate the server-side challenge during login, instead trusting a challenge value returned by the client.
This design flaw allows an attacker who has captured a valid WebAuthn assertion to replay it indefinitely, effectively bypassing the second-factor authentication and maintaining unauthorized access.
Affected context
The vulnerability appears in OneUptime deployments that use WebAuthn as a second-factor authentication mechanism.
It affects environments where:
- WebAuthn is configured as part of the login or step-up authentication flow
- The server does not persist the WebAuthn challenge between generation and verification
- The client is entrusted to return the challenge value, rather than the server comparing it to a securely stored, single-use challenge
Under these conditions, WebAuthn assertions can be reused as long as the underlying credentials remain valid and no additional server-side safeguards (such as strict binding to a nonce or session state) are implemented.
Exploit preconditions
- Attack surface: Application login or second-factor authentication endpoint using WebAuthn
- Required access: Ability to obtain a previously valid WebAuthn assertion and associated data (e.g., via XSS in the application, man-in-the-middle on an insecure transport segment, compromised browser session, or exposure in logs/telemetry)
- Trigger point: Submission of the captured assertion to the WebAuthn verification endpoint, reusing the client-provided challenge value
- Why exploitation is possible:
- The server does not maintain or validate a server-side challenge state per authentication attempt
- The challenge is round-tripped through the client and accepted from the request body
- No effective replay protection (such as single-use challenges or strict comparison to stored state) is enforced, allowing assertions to be reused
Why this happens
The core issue is a broken authentication design that violates the WebAuthn specification, mapping primarily to CWE-287: Improper Authentication and CWE-294: Authentication Bypass by Capture-Replay.
In a secure WebAuthn flow, the server:
- Generates a fresh, unpredictable challenge
- Stores it server-side in a way bound to the current session or login attempt
- Verifies that the response from the authenticator is signed over this exact challenge and context
In the vulnerable implementation, the challenge is not persisted on the server and is instead returned to, and later accepted from, the client.
This shifts the trust boundary to untrusted input and removes the single-use property of the challenge, meaning any valid assertion can be replayed as long as it appears syntactically correct.
The authentication logic thus authenticates based on the mere presence of a structurally valid WebAuthn assertion, without robust proof of freshness or binding to a specific login attempt.
Potential impact
- Attacker can bypass WebAuthn-based second-factor authentication using replayed assertions
- Compromise of user accounts protected by WebAuthn 2FA, assuming attacker already has or can obtain primary credentials or session identifiers
- Long-term unauthorized access, since replayed assertions can be reused until credentials are revoked or configuration changes
- Facilitation of broader account takeover scenarios, including access to monitoring dashboards, alert configurations, and operational controls within OneUptime
- Potential pivot into related infrastructure managed through the compromised OneUptime instance
General mitigation guidance
Effective mitigation focuses on restoring proper authentication semantics and enforcing freshness of WebAuthn assertions:
- Server-side challenge storage:
- Persist each generated WebAuthn challenge on the server, bound to the user identity and/or session, and mark it as single-use.
- During verification, compare the challenge provided by the authenticator's response with the stored value, rejecting mismatches or reused challenges.
- Strict replay protection:
- Invalidate challenges immediately after a verification attempt, regardless of success or failure.
- Track authenticator sign counters or similar mechanisms to detect and refuse stale or suspiciously reused credentials where supported.
- Harden the trust boundary:
- Treat all client-provided challenge values as untrusted; only accept challenges that match server-issued state.
- Avoid echoing security-critical nonces to the client as a source of truth for verification.
- Defense-in-depth for sessions:
- Couple WebAuthn verification to a specific login transaction or session context, ensuring that a captured assertion cannot be applied to unrelated sessions.
- Apply rate limiting, anomaly detection, and step-up authentication when anomalous login behavior is observed.
- Operational mitigations:
- Encourage or require rotation of WebAuthn credentials after fixes are deployed, to reduce risk from previously captured assertions.
- Temporarily fall back to a vetted, more traditional MFA method (e.g., TOTP with proper server-side verification) where appropriate while WebAuthn flows are corrected.
How teams detect issues like this
Security teams can look for this vulnerability and its effects through a combination of code-level and operational detection:
- Static analysis and code review:
- Examine WebAuthn registration and authentication handlers to ensure:
- Challenges are generated server-side and stored in server-side session or database state.
- Verification logic uses server-stored challenges rather than client-supplied values.
- Flag patterns where:
- The challenge is embedded in responses and later read exclusively from client input for verification.
- There is no explicit invalidation or deletion of used challenges.
- Specification-based checks:
- Compare implementation behavior against W3C Web Authentication Level 2, especially §13.4.3 and challenge handling requirements.
- Use security checklists for WebAuthn flows to validate replay protection and challenge lifecycle.
- Runtime and log analysis:
- Monitor authentication logs for repeated successful WebAuthn verifications from the same IP or device fingerprint with identical or suspiciously similar assertion parameters.
- Inspect logs and telemetry to ensure challenges or complete assertions are not being stored in plaintext, as this increases capture risk.
- Automated security testing:
- Use automated test harnesses or dynamic security tools to attempt replay of captured WebAuthn assertions across multiple authentication attempts.
- Integrate these tests into CI/CD pipelines to prevent regression.

