Auth0 Next.js SDK CVE-2025-67716
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft link with malicious returnTo value
-
DeliveryVictim follows authenticated login/redirect flow
-
ExploitUnencoded returnTo injects extra OAuth params
-
ExecutionAuthorization request altered (scope/audience)
-
ImpactToken issued with unintended parameters
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires that the application's returnTo value (used by withPageAuthRequired / the login redirect in @auth0/nextjs-auth0 4.9.0-4.12.1) carry attacker-influenced content that is then passed unencoded into the Auth0 authorization URL; per the patch, vulnerable code built '?returnTo=${returnTo}' without encodeURIComponent, so any ampersand/equals characters in returnTo are interpreted as additional OAuth query parameters. Limiting factors are significant: the attack is network-reachable but needs a privileged/authenticated context and victim user interaction (clicking a crafted login/redirect link), it only applies to apps on the affected version range, and real impact depends on whether returnTo is derived from untrusted input rather than static developer-supplied strings. It does NOT affect apps already on 4.13.0 or later. |
| Impact | This is a moderate-risk, low-urgency issue that should be patched on a normal cadence rather than treated as an emergency. The multi-source signals are consistent and point AWAY from widespread danger: EPSS is 0.26% (17th percentile), there is no CISA KEV listing, and no public exploit code is referenced - so exploitation status is 'no public exploit identified at time of analysis.' The input CVSS of 5.7 (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N) is itself a mixed signal: it pairs high confidentiality/integrity impact with three strong barriers - high attack complexity (AC:H), high privileges (PR:H), and required user interaction (UI:R). Per CVSS the vector is network-reachable but requires authenticated privilege (PR:H) and victim interaction, so this is NOT a drive-by unauthenticated RCE despite AV:N. One tension worth noting: the C:H/I:H impact in the supplied vector appears generous for the described outcome ('tokens being issued with unintended parameters' via OAuth query-parameter injection), which is typically a scope/audience-manipulation issue rather than full data compromise - this is why my independent assessment lowers the impact metrics. The vulnerability is real and the GitHub/Okta advisory plus a vendor patch confirm it, but the combination of low EPSS, no KEV, no POC, and meaningful exploitation preconditions makes this a 'patch in due course' item, not a fire drill. |
| Exploit ScenarioDerived | An attacker crafts a login or redirect link whose returnTo value smuggles extra OAuth query parameters (for example an altered scope or audience) because the SDK fails to URL-encode returnTo before building the Auth0 authorization request. A victim with an authenticated context follows the crafted flow, and the injected parameters are appended to the authorization request, potentially causing Auth0 to issue tokens with unintended scope or audience. No public exploit code was identified, and the CVSS AC:H/PR:H/UI:R metrics mean the attack requires favorable preconditions and user interaction rather than a trivial remote hit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
OAuth query-parameter injection in the Auth0 Next.js SDK (@auth0/nextjs-auth0) versions 4.9.0 through 4.12.1 lets an attacker who can influence the returnTo value append unintended key/value pairs to the Auth0 authorization request, so the resulting login redirect may carry injected parameters such as scope, audience, or connection and issue tokens with unintended properties. Confirmed exploited status is not established - no public exploit code has been identified at time of analysis and the issue is not in CISA KEV - and EPSS is low at 0.26% (17th percentile), with real-world impact gated on an authenticated/privileged context, victim interaction with a crafted login link, and the application actually deriving returnTo from untrusted input rather than a static developer-supplied string. Auth0/Okta fixed the flaw in version 4.13.0, which URL-encodes returnTo via encodeURIComponent before it is placed in the redirect; our independent assessment rates this moderate risk and low urgency, suitable for routine patch cadence rather than emergency response.
RemediationAI
Upgrade @auth0/nextjs-auth0 to version 4.13.0 or later; this is the vendor-released fix ("Patch available per vendor advisory", with the exact fixed version specified as 4.13.0) and it resolves the issue by URL-encoding returnTo with encodeURIComponent before the value is appended to the login URL, which prevents ampersand- and equals-delimited parameter injection into the Auth0 authorization request. The change can be reviewed in the upstream commit at https://github.com/auth0/nextjs-auth0/commit/35eb321de3345ccf23e8c0d6f66c9f2f2f57d26c and the full advisory at https://github.com/auth0/nextjs-auth0/security/advisories/GHSA-mr6f-h57v-rpj5. If an upgrade cannot be performed immediately, the effective compensating control is to ensure returnTo is never derived from untrusted request input: replace dynamic returnTo values (including the function form of the option) with a hardcoded path or an allowlist of known-safe application-relative paths, rejecting anything containing '?', '&', '=', '%', or a scheme/host component - the trade-off is loss of dynamic post-login redirection that some applications rely on, and this only helps where the vulnerable value was attacker-influenced in the first place. Where patching is deferred, note that deploying a reverse-proxy or middleware rewrite that percent-encodes the returnTo query value before it reaches the SDK's login endpoint can also reduce exposure, though it adds an operational dependency and does not fix the underlying library; there is no configuration flag in the SDK that disables the vulnerable interpolation.
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
The affected component is the npm package @auth0/nextjs-auth0, a server-side library that wires Next.js applications into Auth0-hosted OAuth 2.0 / OpenID Connect login. The relevant code path is the app route handler factory used by withPageAuthRequired, which builds the login redirect as ${config.loginUrl}?returnTo=${returnTo}; because the value was interpolated without output encoding, any ampersand or equals sign inside returnTo was interpreted by the downstream /authorize request as an additional OAuth query parameter instead of as part of the return path. The root-cause class is CWE-184 (Incomplete List of Disallowed Input) - the code attempted to constrain the parameter but failed to neutralize delimiter characters, so the fix in commit 35eb321 changed the line to ?returnTo=${encodeURIComponent(returnTo)} and added regression tests for values that previously broke the boundary (for example '/callback?scope=openid profile&audience=https://api.example.com' now becomes a single percent-encoded returnTo value rather than three separate query parameters). The CPE entry cpe:2.3:a:auth0:nextjs-auth0:*:*:*:*:*:node.js:*:* identifies the Node.js package as the affected technology, and the impact is bounded by which parameters an application's authorization request can meaningfully be steered with - the injected keys must be ones Auth0 honors in that context, which is why the assessed vector lowers confidentiality and integrity impact to Low rather than the NVD-published High.
Know when Nextjs Auth0 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:H/UI:R/S:U/C:H/I:H/A:N
Network-reachable but needs attacker-controlled returnTo plus victim interaction (AC:H, UI:R); some privileged/authenticated context typical (PR:L); impact limited to token parameter manipulation, not full compromise (C:L/I:L).
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
The Auth0 Next.js SDK is a library for implementing user authentication in Next.js applications. Versions 4.9.0 through 4.12.1 contain an input-validation flaw in the returnTo parameter, which could allow attackers to inject unintended OAuth query parameters into the Auth0 authorization request. Successful exploitation may result in tokens being issued with unintended parameters. This issue is fixed in version 4.13.0.
Blast Radius
ecosystem impact- 1 npm packages depend on @auth0/nextjs-auth0 (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 4.9.0.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Affected Products (CPE)CVE.org
More in Nextjs Auth0
View allThe Auth0 Next.js SDK is a library for implementing user authentication in Next.js applications. Rated medium severity (
The Auth0 Next.js SDK is a library for implementing user authentication in Next.js applications. Rated medium severity (
Concurrent token requests handled by the Auth0 Next.js SDK can be resolved through an internal in-flight request cache t
Authentication bypass in Auth0 Next.js SDK versions 4.12.0 through 4.17.1 allows authenticated users with UI interaction
NVD
CVE.org
EPSS
GitHub
Exploit-DB