/

CVE-2026-28787

Severity:

HIGH RISK

(8.2)

Authentication Bypass in OneUptime 2FA Flow

CVE-2026-28787

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287, CWE-294

Impact:

Second-Factor Authentication Bypass and Account Compromise

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/OneUptime/oneuptime/security/advisories/GHSA-gjjc-pcwp-c74m

Frequently asked

questions

Exploitability depends on an attacker's ability to capture a valid WebAuthn assertion, but once obtained, that assertion can typically be replayed multiple times because the server does not enforce challenge freshness or single-use behavior.

The attacker must gain access to at least one valid WebAuthn assertion and its associated data, which might occur via cross-site scripting in the application, interception of traffic in a weakly protected network path, or accidental logging of assertions in plaintext. In many practical scenarios, the attacker will also need or obtain the user's primary credentials or session to fully leverage the replay.

Implement a standards-compliant WebAuthn flow where challenges are generated and stored on the server, bound to a specific session or login attempt, and invalidated after a single verification. Verification logic should compare the authenticator's response to the server-stored challenge and enforce replay protection via single-use semantics and, when applicable, sign counter checks.

Future prevention relies on treating authentication state as strictly server-controlled, aligning closely with official specifications (such as the WebAuthn standard), and subjecting authentication flows to dedicated security reviews and tests. Using well-maintained reference libraries, incorporating specification-based test suites, and adding automated checks for challenge lifecycle management can significantly reduce the risk of repeating this class of vulnerability.

Find out what's already
exploitable in your codebase.