VulnWatch by ve1ve2
high 7.7 EPSS 0.45%

GHSA-6x5c-84vm-5j56 / CVE-2026-47164: SSO Email Auto-Link Can Bind an Existing Local Account to an Attacker-Controlled IdP Identity

Source:
Vaultwarden releases + advisories (GitHub dani-garcia/vaultwarden)
Published:
Fetched:
Updated:
Affects:
dani-garcia vaultwarden

https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-6x5c-84vm-5j56 ↗

repo-advisoryCWE-284securityrepo:dani-garcia/vaultwarden

SSO Email Auto-Link Can Bind an Existing Local Account to an Attacker-Controlled IdP Identity ## Summary A vulnerability in Vaultwarden's SSO login flow allowed an attacker who controlled an IdP identity asserting the victim's email address to bind that identity to the victim's existing Vaultwarden account and authenticate as the victim. The IdP's `email_verified` claim was checked in the new-user creation branch but not in the existing-user binding branch of the SSO login handler. Combined with the default `SSO_SIGNUPS_MATCH_EMAIL=true`, this allowed an email match alone to be treated as sufficient authority for linking a new SSO identity to a pre-existing Vaultwarden account. ## Affected versions All Vaultwarden versions with SSO support up to and including 1.35.8. Versions 1.36.0 and up are fixed. ## Root cause The SSO login handler resolves the incoming IdP identity in three steps: 1. Look up an existing `SsoUser` by stable identifier (issuer + subject). 2. If none, fall back to looking up a local user by the IdP-supplied email. 3. If a local user is found, complete the login and persist a new SSO binding. The `email_verified` gate was applied only on the new-user branch (step 3 with no local match). On the existing-user branch, the IdP-supplied email was trusted as proof of ownership without consulting the `email_verified` claim. An IdP identity could therefore claim a victim's email — verified or not — and the resulting login flow would proceed against the victim's account. ## Attack chain 1. The attacker registers an identity at the configured IdP whose `email` claim equals the victim's Vaultwarden email. The IdP may set `email_verified` to `false` or omit it. 2. The attacker initiates SSO login at Vaultwarden and authenticates at the IdP as the attacker's identity. 3. `sso_login` finds no `SsoUser` by identifier, falls back to lookup by email, and matches the victim's existing local account. 4. With no `email_verified` check on this branch, the flow proceeds to the 2FA gate. If the victim has no Vaultwarden 2FA configured, a session for the victim's account is issued to the attacker. 5. A new SSO binding linking the attacker's IdP subject to the victim's user UUID is persisted, providing repeat access. ## Impact - Account takeover of SSO-eligible victims without Vaultwarden 2FA whose email matches an IdP identity the attacker can obtain. - Full read of the victim's encrypted vault material (`Key`, `PrivateKey`, ciphers), enabling offline brute-force of the master password. - Authenticated session actions: device registration, emergency-access grant creation, cipher modification and deletion. - Potential org-level privilege escalation if the victim holds Owner privileges in any organization. - Persistent SSO binding remains attached to the victim's account after the session expires. ## Preconditions - SSO is enabled on the Vaultwarden instance. - `SSO_SIGNUPS_MATCH_EMAIL=true` (default). - The victim has an existing Vaultwarden account whose email matches an IdP identity the att Affected packages: :vaultwarden Patched: vaultwarden 1.36.0

Linked vulnerabilities (2)

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L

SSO Email Auto-Link Can Bind an Existing Local Account to an Attacker-Controlled IdP Identity

CWE: CWE-284Aliases: CVE-2026-47164
CVE-2026-47164 high 7.7 EPSS 0.45% (p40) NVDCVE.orgGHSA
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L

SSO Email Auto-Link Can Bind an Existing Local Account to an Attacker-Controlled IdP Identity

CWE: CWE-284Aliases: GHSA-6x5c-84vm-5j56