/

CVE-2026-47164

Severity:

HIGH RISK

(7.7)

Improper Access Control (CWE-284) in Vaultwarden SSO

CVE-2026-47164

Deferred

Vulnerability type

Category:

Improper Access Control

CWE:

CWE-284

Impact:

Account Takeover / Authentication Bypass

Severity:

HIGH RISK

(7.7)

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

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_verified claim 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 email and email_verified claims.
  • Trigger point: Initiating an SSO login flow where the IdP asserts an email address matching an existing Vaultwarden user while SSO_SIGNUPS_MATCH_EMAIL=true is enabled.
  • Why exploitation is possible: The application only validated email_verified on 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_verified checks, 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 email and email_verified.

Sources

SourceLink
github.comgithub.com/dani-garcia/vaultwarden/commit/d297e274a35dccd0f5d935e9d5934e0f7e9c0a87
github.comgithub.com/dani-garcia/vaultwarden/pull/7163
github.comgithub.com/dani-garcia/vaultwarden/releases/tag/1.36.0
github.comgithub.com/dani-garcia/vaultwarden/security/advisories/GHSA-6x5c-84vm-5j56

Frequently asked

questions

Yes, it can be exploited remotely via the SSO login interface, provided the attacker can control or influence an IdP that Vaultwarden trusts and can assert email claims matching existing users.

The attacker needs the ability to operate or manipulate a trusted IdP (or its configuration) so that it issues authentication responses with chosen email and email_verified values. Direct access to the Vaultwarden server is not required beyond the standard SSO endpoint.

The safest pattern is to enforce uniform verification logic across all SSO flows—new user creation, account linking, and subsequent logins—so that claims like email_verified are consistently checked whenever they are relied upon to prove identity.

Future prevention involves designing SSO integrations with explicit threat models, minimizing trust in unverified claims, requiring strong identity assurance for account linking, and routinely auditing authentication and authorization code paths for inconsistent checks or special-case logic.

Find out what's already
exploitable in your codebase.