Summary
Vaultwarden contains an authentication rate-limiting bypass where the email-based 2FA helper endpoint can be abused as a password guessing oracle.
By probing the unprotected /api/two-factor/send-email-login endpoint, an attacker can brute-force username/password combinations without triggering the normal login brute-force protection, even for users who do not have email 2FA configured.
Affected context
This issue affects Vaultwarden deployments that:
- Expose the
/api/two-factor/send-email-loginendpoint to the network (e.g., Internet-facing instances) - Have email-based two-factor authentication enabled at the server level
- Rely on Vaultwarden's built-in brute-force protection to limit password guessing attempts
The vulnerability arises because the 2FA email sending endpoint effectively validates username/password pairs without being subject to the same rate limiting as the primary login endpoint.
Exploit preconditions
- Attack surface: Network-accessible Vaultwarden API, specifically
/api/two-factor/send-email-login - Required access: No prior authentication; attacker needs only network access to the Vaultwarden instance
- Trigger point: Repeated invocation of the email 2FA endpoint with candidate username/password pairs
- Why exploitation is possible: The endpoint's behavior depends on whether the provided credentials are valid, and it is not protected by the same brute-force rate limiting as the standard login flow. This creates an oracle that reveals when a correct username/password combination has been found.
Why this happens
The underlying issue is an inconsistent application of authentication rate limiting across related authentication flows.
While the primary login endpoint enforces brute-force protections, the auxiliary email 2FA endpoint can be called with credentials and responds in a way that distinguishes valid from invalid username/password combinations.
This maps to CWE-307: Improper Restriction of Excessive Authentication Attempts, where secondary or supporting authentication endpoints are not subject to the same rate-limiting and lockout policies as the main login mechanism.
Potential impact
- Attacker can systematically brute-force passwords for arbitrary accounts without triggering standard login rate limits
- Unauthorized access to user vaults if weak or reused passwords are successfully guessed
- Compromise of sensitive stored data (e.g., credentials, secrets, personal information)
- Potential pivot into other systems and services via stolen credentials
- Erosion of user trust due to perceived bypass of advertised security protections
General mitigation guidance
Effective mitigation centers on aligning all authentication-related endpoints with consistent rate-limiting and abuse-prevention policies.
Common defensive patterns include:
- Applying the same brute-force protections (rate limits, lockouts, backoff) to every endpoint that can validate or infer credential correctness, including 2FA helpers and recovery flows
- Designing 2FA-related APIs so they do not internally re-check username/password combinations, or ensuring such checks are handled by a shared component that already enforces throttling
- Normalizing responses and timing so auxiliary endpoints do not act as credential validity oracles
- Introducing centralized authentication middleware that enforces rate limiting and anomaly detection uniformly across login, 2FA, and account recovery routes
- Encouraging and supporting strong, unique passwords and optional additional factors (e.g., hardware or app-based 2FA) to reduce the effectiveness of brute-force attacks
How teams detect issues like this
Organizations can detect and monitor for this kind of weakness and abuse by:
- Reviewing authentication code paths to ensure that all endpoints which accept or validate credentials share common rate-limiting and lockout logic
- Using static analysis or code search to identify routes that:
- Accept username and password parameters
- Branch behavior based on credential validity
- Bypass centralized authentication middleware
- Performing security tests that attempt high-volume login attempts across both primary and secondary authentication endpoints, verifying that rate limiting is consistently enforced
- Monitoring logs and metrics for:
- High-frequency requests to the email 2FA endpoint
- Repeated requests with varying passwords for the same username
- Patterns of distributed or scripted login attempts that target non-primary endpoints
- Employing automated API security testing tools that can simulate abusive authentication flows and identify endpoints acting as oracles

