Summary
Rodauth versions before 2.46.0 contain an authentication bypass in the WebAuthn login route. A logged-in user may be able to authenticate as another account when the application resolves identity from a session identifier without validating that the WebAuthn credential belongs to the selected account.
Affected context
The vulnerability occurs in Rodauth deployments that enable the WebAuthn login route and allow an already authenticated user to reach the affected account-resolution flow. Risk is higher when session-derived account identifiers are trusted without confirming the binding between the presented credential and the account being authenticated.
Exploit preconditions
- Attack surface: The Rodauth WebAuthn login route
- Required access: An existing authenticated session or logged-in account
- Trigger point: Account resolution during WebAuthn authentication
- Why exploitation is possible: The route may fall back to a session account identifier without validating that the WebAuthn credential is bound to that account
Why this happens
The underlying bug is an account identity validation failure. Authentication logic can use an identifier carried by an existing session as the target account while failing to independently verify that the WebAuthn credential belongs to that account. This behavior maps to CWE-287, Improper Authentication, because the application does not sufficiently establish that the authenticating party is authorized to act as the resolved account.
Potential impact
- An attacker may authenticate as another user
- An attacker could access account-specific data and functionality
- Privileged accounts may be impersonated if they are reachable through the affected flow
- Unauthorized actions could be attributed to the impersonated account
- Application integrity and audit reliability may be reduced
General mitigation guidance
Mitigation generally focuses on making account selection and credential verification independent, explicit, and fail-closed. WebAuthn credentials should be accepted only after their registered account binding is verified, while session identifiers should be treated as contextual data rather than authoritative proof of identity. Secure-by-default authentication flows can require an unambiguous account context, reject mismatches, and avoid fallback behavior. Input trust should be reduced through server-side lookups and consistent credential-to-account checks, and sensitive accounts should operate with least privilege and additional access controls where appropriate.
How teams detect issues like this
Detection approaches include static analysis and code review for authentication branches that resolve users from session identifiers without credential ownership checks. Reviewers can inspect WebAuthn handlers for fallback account selection, inconsistent identity sources, missing mismatch failures, and authorization decisions made before credential binding is verified. Runtime monitoring can alert on unusual successful WebAuthn logins involving changes in account context, device patterns, or privilege levels. Security policy enforcement and automated code review tools may help identify these patterns during development.

