Skip to main content

Auth0 Next.js SDK CVE-2025-67716

MEDIUM
Incomplete List of Disallowed Inputs (CWE-184)
2025-12-11 security-advisories@github.com
5.7
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Craft link with malicious returnTo value
  2. Delivery
    Victim follows authenticated login/redirect flow
  3. Exploit
    Unencoded returnTo injects extra OAuth params
  4. Execution
    Authorization request altered (scope/audience)
  5. Impact
    Token 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

npm @auth0/nextjs-auth0 fix: 4.13.0

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

Vendor (github) PRIMARY 5.7 MEDIUM
AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
vuln.today AI 3.7 LOW

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).

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on @auth0/nextjs-auth0 (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 4.9.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Medium
popular Auth0 SDK but scoped to Next.js apps using Auth0
Data Quality
4 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Code Injection CRITICAL

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

cpe:2.3:a:auth0:nextjs-auth0:*:*:*:*:*:node.js:*:*

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