Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify multi-provider app with account linking enabled
-
DeliveryObserve target provider A's authorization endpoint or redirect URI
-
ExploitLure victim to initiate legitimate OAuth flow with provider A
-
InstallManipulate browser redirect so callback hits provider B endpoint
-
C2Provider B callback consumes provider A state/nonce cookie due to missing provider binding
-
ExecuteAttacker's provider B account linked to victim's Auth.js identity
-
ImpactAttacker gains persistent access to victim account via linked provider
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Data authenticity verification
|
| Exploitation Conditions | Exploitation requires ALL of the following conditions to hold simultaneously: the application configures multiple OAuth/OIDC providers; authenticated users are permitted to link additional providers via Auth.js account-linking; at least one configured provider's authorization request is observable by the attacker (e.g., a well-known or attacker-influenced authorization server endpoint or redirect URI); and at least one target provider's callback can be satisfied using only the state or nonce cookie without a PKCE verifier, meaning that provider does not mandate PKCE on the relying party. Applications using a single OAuth provider are explicitly not affected. Applications that do not allow logged-in account linking are explicitly not affected. Applications where every configured provider enforces PKCE are explicitly not affected. Additionally, exploitation requires the victim to actively initiate a legitimate same-origin OAuth flow, which the attacker cannot force via CSRF alone - social engineering or a crafted same-origin link is required. CVSS PR:N reflects that the attacker requires no authentication on the target application. |
| Impact | The vendor-assigned CVSS 3.1 score of 6.8 with vector AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N accurately reflects the risk profile. AC:H is justified by four simultaneous preconditions that must all hold: multiple OAuth/OIDC providers configured, account linking while authenticated enabled, at least one provider's authorization flow observable by the attacker, and at least one target provider not enforcing PKCE. UI:R correctly captures that the victim must be socially engineered into initiating a legitimate OAuth flow - pure CSRF is explicitly insufficient per the advisory. The high C and I scores reflect the real-world consequence: a successful attack yields durable account takeover via a persistently linked provider credential, a severe impact. No EPSS data was provided in the input, and the vulnerability is not listed in CISA KEV, indicating no confirmed mass exploitation at time of analysis. The high complexity requirements substantially reduce practical exploitation likelihood compared to what the base CVSS severity alone implies, making this a high-priority patch specifically for multi-provider deployments with account linking enabled, but a lower operational priority for single-provider applications or those without the linking feature. |
| Exploit ScenarioDerived | An attacker targeting a multi-provider Next.js application with account linking identifies that one configured provider (e.g., GitHub) does not enforce PKCE. The attacker lures the authenticated victim into clicking a link that initiates a legitimate GitHub OAuth flow in the victim's browser, generating a state cookie scoped globally - not to GitHub. Before the victim completes the GitHub flow, the attacker manipulates the redirect so the callback is processed by a second provider (e.g., Google), which accepts the GitHub-minted state cookie due to the absent provider binding. This causes the attacker's pre-authorized Google account to be linked to the victim's Auth.js user, granting the attacker persistent sign-in to the victim's account via the linked Google credential. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 12, 2026
Provider-confusion in NextAuth.js (next-auth and @auth/core) allows an attacker to link their own OAuth identity at a target provider to a victim's Auth.js user account, granting the attacker persistent unauthorized sign-in. The flaw stems from OAuth anti-CSRF cookies - state, nonce, and PKCE verifier - being stored globally without binding to the originating provider, so a callback for one provider can consume check values minted during a flow initiated with a different provider. No public exploit code or CISA KEV listing exists at time of analysis, but the CVSS 6.8 score with C:H/I:H reflects a full account-takeover outcome when the required multi-condition setup is present.
RemediationAI
Vendor-released patches are available: upgrade to @auth/core 0.41.3 (https://github.com/nextauthjs/next-auth/releases/tag/@auth/core@0.41.3), next-auth 4.24.15 (https://github.com/nextauthjs/next-auth/releases/tag/next-auth@4.24.15), or next-auth 5.0.0-beta.32 (https://github.com/nextauthjs/next-auth/releases/tag/next-auth@5.0.0-beta.32). The fix, implemented in PR #13469 and commit 5bca2399a79ba8d116ca5179b4b1ebcd152e7f05, embeds the provider ID in every check cookie's signed payload and validates it on callback, ensuring a cookie minted for one provider cannot be consumed by another. If an immediate upgrade is not feasible, the advisory recommends enabling PKCE (checks: ['pkce']) on every configured provider that supports it - this blocks the practical code-swap variant because the attacker cannot obtain or reproduce the PKCE verifier; note this does not protect providers that do not support PKCE at all. Disabling logged-in account linking across providers eliminates the attack surface entirely at the cost of removing user functionality. As a detective compensating control, adding audit logging and out-of-band user notification to the events.linkAccount hook can help identify exploitation attempts until a patch is applied.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is classified as CWE-345 (Insufficient Verification of Data Authenticity) and exists within the OAuth/OIDC callback verification logic of Auth.js. Affected packages are npm/next-auth (CPE: cpe:2.3:a:nextauthjs:next-auth:*:*:*:*:*:*:*:*) and npm/@auth/core (CPE: cpe:2.3:a:@auth:core:*:*:*:*:*:*:*:*). OAuth 2.0 and OIDC flows use three anti-CSRF check values - the state parameter, the OIDC nonce, and the PKCE code verifier - stored in HTTP cookies when an authorization request begins. The root cause, confirmed by inspection of PR #13469 against checks.ts, is that the cookie JWT payload stored only the raw check value without embedding the originating provider ID. On callback, the code validated the value itself but never asserted that the cookie was created for the provider currently handling the callback, enabling a cross-provider substitution known as an OAuth mix-up or provider-confusion attack. The fix in commit 5bca2399 adds the provider ID into the signed cookie payload and validates it on every callback, so a cookie minted for GitHub cannot be consumed by a Google callback handler.
Know when 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
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
AC:H for four simultaneous preconditions; UI:R because victim must actively initiate the OAuth flow; PR:N as the attacker needs no application credentials; C:H/I:H for durable account takeover via persistent provider linkage; A:N for no availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
NextAuth.js provides authentication for Next.js. Prior to@auth/core 0.41.3 and next-auth 4.24.15 and 5.0.0-beta.32, Auth.js stores the OAuth/OIDC anti-CSRF checks state, nonce, and the PKCE verifier in global cookies that are not bound to the provider that created them. On callback, a check value minted during a sign-in started with one provider can satisfy the callback for a different provider because the stored cookie is not verified against the callback provider's identity, including the provider ID, issuer, client ID, or redirect URI. In a multi-provider application that permits account linking while logged in, when one provider's authorization request is observable and a target provider callback can be satisfied without a PKCE verifier, an attacker can lure a victim into starting a legitimate same-origin flow and link the attacker's target-provider account to the victim's Auth.js user. The linked provider grants the attacker persistent sign-in to the victim's account, while cross-site request forgery alone is insufficient. This issue is fixed in @auth/core 0.41.3 and next-auth 4.24.15 and 5.0.0-beta.32.
Blast Radius
ecosystem impact- 251 npm packages depend on @auth/core (72 direct, 182 indirect)
Ecosystem-wide dependent count for version 0.41.3.
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
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
Cross-tenant authorization bypass in TinaCMS self-hosted deployments allows any holder of a legitimate TinaCloud account
Denial of service in NextAuth.js's getToken() helper allows unauthenticated remote attackers to crash any API route, mid
Supabase Auth allows remote attackers to hijack user sessions by crafting fraudulent ID tokens when Apple or Azure OAuth
EUVD-2026-57601
GHSA-x445-f3h2-j279
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB