Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconLearn victim email
-
DeliveryPre-register email via /sign-up/email
-
ExploitAttacker row saved emailVerified:false
-
InstallVictim performs first OAuth sign-in
-
C2Callback email-fallback links OAuth to attacker row
-
ExecuteLocal emailVerified flipped to true
-
ImpactAttacker logs in with password, full takeover
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication mechanism validation
MITRE ATT&CK
2 techniques across 2 tactics: Defense Evasion, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a better-auth deployment (< 1.6.11) with ALL of: |
| Impact | The supplied CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L, base 8.3, High) reflects a network-reachable, unauthenticated attack with full confidentiality and integrity impact, gated only by required victim interaction (the victim's later OAuth login). No EPSS score, KEV entry, POC, or SSVC decision data was provided, so exploitation-probability signals are absent rather than low - treat 'no public exploit identified' as unconfirmed-not-negative. The realistic risk is meaningfully constrained by preconditions the attacker does not fully control: the attacker must know the victim's email, pre-register it before the victim, and the victim must subsequently authenticate through OAuth/SSO to a still-vulnerable, default-configured deployment. This argues the practical complexity is higher than AC:L implies; I independently assess AC:H. Against that, the affected code path is default-on (email/password + any OAuth provider + implicit linking enabled by default) and the impact is persistent full account takeover, so for any app matching that configuration this is a genuine priority, not a high-CVSS paper cut. The named parallels (nOAuth, Sign in with Apple) show this class is exploited in the wild generally, even though this specific CVE has no confirmed active exploitation. |
| Exploit ScenarioDerived | An attacker calls |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 07, 2026
Pre-account-hijacking in the better-auth Node/TypeScript authentication library (versions < 1.6.11 on the stable line and all current next pre-releases) lets an unauthenticated attacker seize a victim's account by pre-registering the victim's email via /sign-up/email, then having the victim's later OAuth/SSO sign-in implicitly linked to the attacker's row. The result is a single account the attacker controls with a working password login plus the victim's OAuth identity, and the link-time verification flip defeats requireEmailVerification: true. No public exploit identified at time of analysis; not listed in CISA KEV, though the flaw is the same class as Microsoft nOAuth (2023) and the Sign in with Apple JWT flaw (2020).
RemediationAI
Vendor-released patch: better-auth@1.6.11 - upgrade to 1.6.11 or later, which adds the local-side ownership check so implicit linking now refuses to attach an OAuth identity to a local account whose emailVerified is false, applies the same gate in the one-tap plugin, and normalizes Google's email_verified claim through toBoolean. The new gate is exposed as account.accountLinking.requireLocalEmailVerified (default true); apps whose users legitimately sign up via OAuth without ever verifying a local email can opt out with account: { accountLinking: { requireLocalEmailVerified: false } }, but this restores the vulnerable legacy behavior and is already marked deprecated, so avoid it. If you cannot upgrade immediately, set account.accountLinking.disableImplicitLinking: true to force all linking through the authenticated /link-social endpoint (side effect: users can no longer add a login method during an unauthenticated OAuth callback and must be signed in first), or set account.accountLinking.enabled: false to disable linking entirely (side effect: breaks the multi-login-method UX completely). Do not rely on emailAndPassword.requireEmailVerification: true - the link-time emailVerified flip promotes the attacker's row to verified and bypasses it. Advisory: https://github.com/better-auth/better-auth/security/advisories/GHSA-g38m-r43w-p2q7.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
better-auth is a framework-agnostic authentication library distributed on npm (pkg:npm/better-auth) providing email/password, social OAuth, generic OAuth, and SSO (OIDC/SAML) flows. The defect lives in handleOAuthUserInfo, the shared OAuth-callback routine invoked by every social provider, genericOAuth, oauth-proxy, @better-auth/sso, and one-tap. When no (accountId, providerId) account match exists, user lookup falls back to matching on email, surfacing any pre-existing local row at that address. The auto-link gate then trusted only the OAuth provider's userInfo.emailVerified claim and never read the local user row's own emailVerified field - the root cause maps to CWE-287 (Improper Authentication) and closely to CWE-345 (Insufficient Verification of Data Authenticity). A separate, individually-correct post-link step promotes the local emailVerified to true when the provider asserts a matching verified email; combined with the missing local-side check, that promotion becomes load-bearing for the takeover. A related Google ID-token quirk - a string "false" for email_verified being treated as truthy - was also hardened via toBoolean normalization.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
Network-reachable and unauthenticated (AV:N/PR:N), but AC:H because the attacker must win a pre-registration race and the victim must later OAuth-login (UI:R); full account takeover gives C:H/I:H, no availability impact (A:N).
Primary rating from Vendor (https://github.com/better-auth/better-auth).
CVSS VectorVendor: https://github.com/better-auth/better-auth
DescriptionCVE.org
Am I affected?
Users are affected if all of the following are true:
- Their application uses
better-authat a version< 1.6.11on the stable line, or any currentnextpre-release. emailAndPassword.enabled: trueis set in their application'sbetterAuth({ ... })configuration.- At least one OAuth or SSO provider is configured (any built-in social provider, or
genericOAuth(...), or any provider via@better-auth/sso). account.accountLinking.disableImplicitLinkingis not set totrue.account.accountLinking.enabledis not set tofalse.
Setting either disableImplicitLinking: true or enabled: false closes the hole at the cost of breaking the standard "add another login method" UX. emailAndPassword.requireEmailVerification: true does not mitigate, because the link-time emailVerified flip promotes the attacker's row to verified, after which the password login becomes usable.
Fix:
- Upgrade to
better-auth@1.6.11or later. - If developers cannot upgrade, see workarounds below.
Summary
The OAuth callback's auto-link gate in handleOAuthUserInfo admits an implicit account link whenever the provider asserts email_verified: true, without requiring the local user row's emailVerified to also be true. An attacker who pre-registers a victim's email through /sign-up/email (which writes a row with emailVerified: false) can have the victim's later OAuth identity bound to the attacker's user row, granting both a password login and the victim's OAuth identity on the same account. This is the pre-account-hijacking class - the same shape as Microsoft "nOAuth" (2023) and the Sign in with Apple JWT flaw (2020).
Details
The auto-link gate validates only the OAuth provider's userInfo.emailVerified claim. The local row's emailVerified field is never read. When no (accountId, providerId) match exists, the user lookup falls back to email, which surfaces any pre-registered row at that email.
A separate post-link step promotes the local emailVerified to true when the provider's claim is true and the local email matches the provider's email. This step is correct for legitimate first-time linking, but combined with the missing local-side check it becomes load-bearing for the takeover: after the link, the attacker's password row is treated as verified, defeating requireEmailVerification: true as a mitigation.
The fix adds the local-side ownership check to the gate: implicit linking now also rejects when dbUser.user.emailVerified is false. The same primitive lives in one-tap and inherits the same fix shape; the SSO domainVerified short-circuit follows separately as a hardening change.
Patches
Fixed in better-auth@1.6.11. Implicit linking now refuses to attach an OAuth identity to a local account whose emailVerified flag is false. The same gate change applies in the one-tap sign-in plugin, which previously had its own simpler linking path. The Google ID-token email_verified claim is also normalized through toBoolean so a string "false" is treated as falsy (some Google responses send the string, which the prior code treated as truthy).
The public surface for the new gate is account.accountLinking.requireLocalEmailVerified, defaulted to true. Applications whose users sign up through OAuth without ever verifying their email locally can opt out with account: { accountLinking: { requireLocalEmailVerified: false } } to retain the legacy permissive behavior. The option is marked @deprecated; the gate at each call site carries a FIXME pointing at the next-minor follow-up that drops the option and makes the check unconditional.
Test fixtures across the admin, oidc-provider, mcp, generic-oauth, last-login-method, and oauth-provider suites now pre-verify created users via a databaseHooks.user.create.before hook (or the disableTestUser opt-in on the oauth-provider RP fixture) so those suites continue to exercise their role and flow logic rather than tripping the new gate.
Workarounds
If developers cannot upgrade their applications immediately:
- Disable implicit linking: set
account.accountLinking.disableImplicitLinking: true. Forces all linking through the authenticated/link-socialendpoint where the user must already be signed in. - Disable linking entirely: set
account.accountLinking.enabled: false. Closes the hole but breaks the multi-login-method UX entirely.
emailAndPassword.requireEmailVerification: true alone does not mitigate, because the link-time emailVerified flip promotes the attacker's row to verified.
Impact
- Account takeover via pre-account hijacking: the attacker holds a working password login plus the victim's OAuth identity on the same account, granting persistent access.
requireEmailVerification: truebypass: the attacker's password login becomes usable post-link.- Cross-flow reach: every OAuth and SSO sign-in path that calls
handleOAuthUserInfois affected (built-in social providers, generic-oauth, oauth-proxy, SSO OIDC, SSO SAML, one-tap).
Credit
Reported by @avrmeduard.
Resources
Blast Radius
ecosystem impact- 34 npm packages depend on better-auth (20 direct, 14 indirect)
Ecosystem-wide dependent count for version 1.6.11.
Executive ViewAI
better-auth (Node/TypeScript authentication library) in versions below 1.6.11 and current pre-releases allows unauthenticated attackers to hijack user accounts by pre-registering victim email addresses and exploiting implicit OAuth linking. Organizations using vulnerable better-auth versions face immediate risk of complete account compromise, enabling attackers to access user data and systems with both password and OAuth credentials.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable /sign-up/email endpoint to prevent attacker pre-registration; (2) Require email verification confirmation before OAuth linking, independent of requireEmailVerification configuration; (3) Deploy multi-factor authentication (MFA) for user authentication; (4) Add manual approval workflow for new account-linking requests; (5) Monitor and alert on account-linking activities; (6) Consider temporary suspension of self-service registration if organizational risk tolerance is low.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
EUVD-2026-44732
GHSA-g38m-r43w-p2q7
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB