Skip to main content

better-auth CVE-2026-67327

| EUVDEUVD-2026-51841 HIGH
Improper Authentication (CWE-287)
2026-08-01 VulnCheck GHSA-9wm3-rh5c-fc37
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify target email before victim's first login
  2. Delivery
    Register account using victim's email with attacker-chosen password
  3. Exploit
    Account sits unverified, attacker cannot yet log in
  4. Install
    Victim signs in via magic-link or email-OTP
  5. C2
    Library verifies account without removing attacker's password or revoking sessions
  6. Execute
    Attacker logs in with planted credentials
  7. Impact
    Maintains persistent access to victim's account

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

All three of the following conditions must hold simultaneously for exploitation to be possible: (1) the application runs better-auth >= 1.1.3 and < 1.6.22 on the stable line, or >= 1.7.0-beta.0 and < 1.7.0-beta.10 on the pre-release line; (2) either the magic-link plugin or the email-OTP plugin is enabled and exposed to users; (3) open email/password registration is enabled, allowing an attacker to register an arbitrary email address without prior ownership verification. Exploitation is additionally bounded by a timing constraint: the attacker must complete registration with the victim's email before the victim's first successful passwordless authentication - once the legitimate owner has signed in via the passwordless flow even once under the patched code path, the pre-hijack opportunity is permanently closed. The UI:P in the CVSS 4.0 vector reflects that the victim's action (their first passwordless login) is a required step in completing the attack. Applications that enforce email verification before accepting any password, or that disable open registration (invite-only flows), significantly reduce exposure but do not fully eliminate it per the vendor advisory.

Impact

The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L) reflects a serious but user-interaction-dependent vulnerability: the attacker can position the trap remotely with no privileges, but the victim must perform a passwordless login to trigger account verification and complete the attack. VC:H/VI:H indicate full confidentiality and integrity compromise of the victim's account. No EPSS data was provided, so exploitation probability cannot be quantified numerically. This CVE does not appear in the CISA KEV catalog and no public POC has been identified at time of analysis. Despite the absence of known active exploitation, real-world risk should be considered elevated for any application meeting all three prerequisite conditions simultaneously (open registration + magic-link or OTP plugin + no prior email verification enforcement). The attack window is bounded by timing - it closes once the legitimate owner completes their first passwordless login - but many applications have long-dormant accounts or onboard users slowly, extending this window significantly. The attack requires no special technical skill beyond knowing the target's email address and being able to register on the application.

Exploit ScenarioDerived

An attacker learns the email address of a target who has not yet registered on the application (e.g., a newly invited user). Before the target's first login, the attacker visits the registration page and creates an account using the target's email and a password of their choosing; the account remains in an unverified state. When the target receives their invitation and signs in via a magic-link or email-OTP, the better-auth library marks the account verified and issues the target a valid session - but the attacker's password hash is still in the database and all pre-existing sessions remain active. The attacker then logs in normally with the planted credentials and has full, persistent access to the victim's account.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 01, 2026

Pre-account hijacking in better-auth (npm) allows a remote attacker to gain persistent, password-based access to any victim account on applications that combine open email/password registration with the magic-link or email-OTP passwordless plugins. The attacker plants a password on the victim's email address before the legitimate owner ever signs in; when the owner later authenticates via the passwordless flow, the library verifies the account without clearing the pre-existing password or revoking pre-existing sessions, leaving the attacker's credentials valid. No public exploit identified at time of analysis, but the attack is mechanically trivial and requires only the ability to register an account - no special tooling, credentials, or network position needed.

RemediationAI

Upgrade to better-auth 1.6.22 or later on the stable npm release line, or to 1.7.0-beta.10 or later on the pre-release line; both versions are confirmed fixed by the vendor advisory GHSA-qq9h-g4jm-xgf3, with the fix implemented in PR #10239 (commit c06a56d83a40bbaeac12d3a8b8b67e59f92a9110). If an immediate upgrade is not possible, two partial mitigations can reduce but not eliminate risk: first, configure the application to require email verification before accepting a password on any account, which adds a barrier that slows the attack setup; second, implement aggressive purging of unverified accounts to shrink the window during which a pre-planted account can sit waiting. Both workarounds reduce the attack surface but do not close the vulnerability, as the vendor advisory explicitly states. Neither mitigation addresses the core flaw - that verification does not revoke prior credentials - so upgrading remains the only complete remediation.

Affected VersionsENISA

better-auth 1.1.3 <1.6.22
better-auth 1.7.0-beta.0 <1.7.0-beta.10

Affected Packages

npm better-auth fix: 1.6.22, 1.7.0-beta.10

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 Node.js authentication framework distributed via npm (CPE: cpe:2.3:a:better-auth:better-auth). It provides modular plugins for various authentication flows, including magic-link and email-OTP passwordless sign-in alongside traditional email/password registration. The root cause is CWE-287 (Improper Authentication): when either passwordless plugin resolves an incoming verification event, it locates the existing account record for the target email and transitions its state to verified, issuing a new session. Before the fix, this state transition did not treat proof of email ownership as authoritative over previously stored credentials - it neither removed the password hash set during unverified pre-registration nor revoked sessions that had been created prior to any email verification. The library effectively conflated 'account exists for this email' with 'the current actor owns this account,' a pre-account-hijacking class flaw analogous to the OAuth pre-hijacking pattern documented in GHSA-g38m-r43w-p2q7. The fix (PR #10239, commit c06a56d) corrects this by treating the passwordless verification event as the canonical proof of ownership: it removes any previously set password and revokes all pre-existing sessions before issuing the new verified session.

Know when Better Auth gets its next vulnerability

  • 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

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
vuln.today AI 8.3 HIGH

Network-reachable with no attacker privileges; victim's passwordless login triggers the flaw (UI:R); full account takeover yields C:H/I:H; A:L for minor session disruption to the victim.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 01, 2026 - 13:01 EUVD
CVE Published
Aug 01, 2026 - 12:22 cve.org
HIGH 8.7

DescriptionCVE.org

better-auth versions >= 1.1.3 and < 1.6.22 (and pre-release versions >= 1.7.0-beta.0 and < 1.7.0-beta.10) are vulnerable to account takeover via pre-account hijacking on magic-link and email-OTP sign-in when open email/password registration is enabled. An attacker registers an account with the victim's email address and an attacker-chosen password; the account remains unverified. When the legitimate owner later signs in via the magic-link or email-OTP passwordless flow, the account is marked verified without removing the pre-existing password or revoking existing sessions, so the attacker's password remains valid, granting persistent access to the victim's account. Fixed in 1.6.22 and 1.7.0-beta.10.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on better-auth (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 1.1.3.

Executive ViewAI

Why It Matters

The better-auth npm library contains a pre-account hijacking vulnerability in passwordless authentication flows (magic links and email OTP) that allows an attacker to claim any user email address and set a password before the legitimate owner logs in. When the actual user later authenticates via the passwordless method, the library fails to clear the attacker's pre-existing password or sessions, granting the attacker persistent access to the account. Any organization using better-auth with passwordless authentication is immediately at risk of widespread account compromise without user knowledge.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Low
newer npm auth library, smaller footprint than Passport.js or NextAuth
Social Media
3
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2024-56734 HIGH POC
7.9 Dec 30

Better Auth is an authentication library for TypeScript. Rated high severity (CVSS 7.9), this vulnerability is remotely

CVE-2026-41427 HIGH POC
7.1 Apr 24

Authorization bypass in the @better-auth/oauth-provider plugin for Better Auth (versions >= 1.4.8-beta.7 and < 1.6.5, pl

CVE-2026-67330 CRITICAL
9.4 Aug 01

Privilege-escalating account takeover in the @better-auth/scim plugin (versions 1.4.0-beta.27 through 1.6.21 and 1.7.0-b

CVE-2026-67336 CRITICAL
9.4 Aug 01

Authentication bypass in Better Auth before 1.6.11 stems from insecure cryptographic defaults in the legacy oidcProvider

CVE-2025-71401 CRITICAL
9.3 Aug 02

Denial of service in Better Auth (npm) before 1.4.2 lets an unauthenticated remote attacker poison the router's base pat

CVE-2026-114607 CRITICAL
9.1 Oct 22

Unauthenticated OAuth state values can be redeemed as Magic Link tokens in Better Auth 1.4.0-beta.18 through 1.7.6, lett

CVE-2026-110864 CRITICAL
9.1 Oct 14

Authentication bypass in Better Auth's OAuth Proxy plugin (versions 1.5.0-beta.12 through 1.7.6) lets unauthenticated re

CVE-2025-71399 HIGH
8.8 Aug 02

Path normalization bypass in Better Auth before v1.4.5 allows unauthenticated remote attackers to circumvent `disabledPa

CVE-2026-67331 HIGH
8.7 Aug 01

Authorization bypass in @better-auth/scim versions 1.5.0 through 1.7.0-beta.3 allows any authenticated user to fully tak

CVE-2026-67328 HIGH
8.6 Aug 01

Multiple authentication bypass vulnerabilities in @better-auth/sso before version 1.6.21 enable low-privileged attackers

CVE-2026-80192 HIGH
8.6 Aug 25

Two domain-ownership authentication bypass flaws in @better-auth/sso allow authenticated organization owners to compromi

CVE-2026-109346 HIGH
8.5 Oct 12

Better Auth versions 1.3.8-beta.3 to before 1.7.0-rc.3 with the deviceAuthorization plugin enabled are vulnerable to a U

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy