Summary
Vaultwarden's SSO login flow previously failed to re-check the IdP's email_verified claim when linking an SSO identity to an existing local account under specific configuration.
If an attacker could control an IdP that asserts a victim's email address, they could bind that identity to the victim's Vaultwarden account and subsequently authenticate as that user.
Affected context
This vulnerability affects Vaultwarden deployments that:
- Enable Single Sign-On (SSO) authentication; and
- Configure
SSO_SIGNUPS_MATCH_EMAIL=true, allowing SSO identities to link to existing accounts based on email; and - Rely on the IdP's
email_verifiedclaim as part of identity assurance.
In these conditions, the server only enforced email_verified checks when creating new users, not when associating an SSO identity to an already existing local account.
Exploit preconditions
- Attack surface: Vaultwarden SSO endpoint exposed to an Identity Provider (IdP) the attacker can influence.
- Required access: Ability to control or operate an IdP (or an IdP integration) that Vaultwarden trusts, including setting the
emailandemail_verifiedclaims. - Trigger point: Initiating an SSO login flow where the IdP asserts an email address matching an existing Vaultwarden user while
SSO_SIGNUPS_MATCH_EMAIL=trueis enabled. - Why exploitation is possible: The application only validated
email_verifiedon new-account creation, not when linking an IdP identity to an existing user, allowing an unverified or attacker-controlled identity to be bound to a victim account by email.
Why this happens
The underlying issue is an improper access control and authorization check gap in the SSO account-linking logic, aligning with CWE-284.
The code path responsible for associating an IdP identity with an existing local account reused less strict assumptions than the new-user creation path, omitting the email_verified validation when SSO_SIGNUPS_MATCH_EMAIL=true.
This created a state where possession of a matching email claim from a trusted IdP was treated as sufficient proof of identity, even if the IdP did not strongly verify ownership of that email address, or the claim could be forged.
Potential impact
- An attacker could take over a victim's Vaultwarden account by binding their IdP identity to the victim's email.
- The attacker may gain access to all secrets, vault items, and stored credentials in the compromised account.
- The attacker could modify or delete stored credentials, impacting service availability and integrity for the victim.
- Compromised accounts could be used as a stepping stone to compromise other linked systems or services via stolen credentials.
General mitigation guidance
Mitigation generally focuses on tightening identity verification and access control within the SSO linkage process:
- Ensure all SSO account-linking and login flows consistently enforce verification checks (such as
email_verified) whenever identities are associated with existing accounts. - Treat email-based account linking as sensitive and require additional assurance signals (e.g., strong IdP verification, optional local confirmation) before binding.
- Prefer configuration patterns where new SSO identities must follow explicit enrollment or administrative approval rather than automatic matching solely on email.
- Limit which IdPs are trusted and validate that their configuration does not allow arbitrary users to assert arbitrary email addresses.
- Apply least-privilege design so that changes in SSO configuration or trust relationships require administrative review and change management.
How teams detect issues like this
Effective detection approaches may include:
- Reviewing SSO integration code paths to confirm that all authentication and account-link operations apply the same verification rules (e.g.,
email_verifiedchecks, issuer validation). - Using static analysis or linting rules to flag divergent authorization checks between "create user" and "link identity" flows.
- Adding logging around SSO events, especially first-time SSO bindings to existing accounts, and monitoring for anomalies such as frequent bindings from unusual IdPs or IP ranges.
- Implementing security-focused code review checklists that call out identity linking, trust boundary crossings, and reliance on claims like
emailandemail_verified.

