Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP request with malformed Bearer header (e.g., 'Bearer %ZZ')
-
DeliverygetToken() reads Authorization header and attempts decodeURIComponent()
-
ExploitURIError thrown by JavaScript runtime
-
ExecutionException propagates uncaught through request handler
-
ImpactPer-request denial of service returned to client
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | The application must call getToken() directly from next-auth/jwt or @auth/core/jwt in an API route, middleware, or server-side request handler - applications that exclusively use the framework's auth() helper and never call getToken() themselves are NOT affected. The attacker must supply a malformed percent-encoded Bearer token in the Authorization header (e.g., 'Authorization: Bearer %ZZ'); a well-formed or absent Bearer token does not trigger the flaw. No session cookie may be present in the request; if getToken() finds a valid session cookie, the Bearer header path is bypassed entirely. The call site must not be wrapped in a try/catch block - any existing exception handling at the application level prevents the DoS from propagating. Limiting factors: requires direct API usage of getToken() (not the auth() abstraction), requires the absence of developer-applied exception handling at that call site, and requires the absence of upstream header validation or normalization. Impact is strictly per-request availability - no authentication bypass, session exposure, or persistent state corruption occurs. |
| Impact | The CVSS 7.5 High rating (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) accurately captures the unauthenticated, low-complexity, network-accessible nature of the attack with pure availability impact and no confidentiality or integrity risk. No EPSS score was provided in the input data, so probabilistic exploitation likelihood cannot be quantified from that signal. This CVE is not listed in the CISA KEV catalog and no public exploit code has been identified at time of analysis, meaning active widespread exploitation is not confirmed. Despite these reassuring signals, the attack is operationally trivial - any HTTP client can send a malformed Bearer header - and NextAuth.js has a broad deployment footprint across the Next.js ecosystem, meaning the realistic exposure surface is large wherever getToken() is called without exception handling. The primary limiting factor is architectural: applications that rely solely on the auth() helper rather than calling getToken() directly are not affected, which meaningfully narrows the true exposure population. No conflicting signals exist between the CVSS vector and the description; the network attack vector is consistent with the HTTP-based trigger mechanism. The per-request rather than persistent nature of the DoS constrains blast radius to individual request availability rather than service-wide outage, though under sustained traffic a vulnerable endpoint would remain continuously unavailable. |
| Exploit ScenarioDerived | An unauthenticated attacker sends a single HTTP GET or POST request to any endpoint that calls getToken() directly, setting the Authorization header to 'Bearer %ZZ' or any other syntactically invalid percent-encoded value. The decodeURIComponent() call inside getToken() immediately throws a URIError, which propagates as an unhandled exception through the request handler, returning an error response to the attacker and denying service for that request. No exploit code is publicly available, but the attack requires no special tooling - a standard curl command with a crafted header is sufficient to trigger it. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 12, 2026
Denial of service in NextAuth.js's getToken() helper allows unauthenticated remote attackers to crash any API route, middleware, or server-side handler that calls getToken() directly by sending a single HTTP request with a malformed Authorization: Bearer header containing invalid percent-encoding. The vulnerability affects next-auth 4.0.6-4.24.14, next-auth 5.0.0-beta.0-5.0.0-beta.31, and @auth/core 0.1.0-0.41.2, and is fixed in next-auth 4.24.15, next-auth 5.0.0-beta.32, and @auth/core 0.41.3. No public exploit code has been identified at time of analysis, but the trigger condition is trivially constructible from the public advisory description alone.
RemediationAI
Upgrade to next-auth 4.24.15 (https://github.com/nextauthjs/next-auth/releases/tag/next-auth%404.24.15), next-auth 5.0.0-beta.32 (https://github.com/nextauthjs/next-auth/releases/tag/next-auth%405.0.0-beta.32), or @auth/core 0.41.3 (https://github.com/nextauthjs/next-auth/releases/tag/%40auth%2Fcore%400.41.3) as appropriate for your installed package; no application code changes are required alongside the package upgrade. If immediate upgrade is not possible, wrap every getToken() call site in a try/catch that assigns null on error, treating a thrown exception as an absent token - this requires auditing all call sites because any missed location remains vulnerable. Alternatively, normalize or reject incoming Authorization headers at the edge (reverse proxy, CDN, or upstream middleware) before they reach getToken(), stripping any Bearer value that contains invalid percent-encoding sequences; this has the trade-off of potentially rejecting edge-case legitimate tokens if the normalization logic is overly broad. Full advisory and patch references: https://github.com/nextauthjs/next-auth/security/advisories/GHSA-xmf8-cvqr-rfgj.
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
NextAuth.js is a popular authentication library for Next.js applications, exposing a getToken() helper in next-auth/jwt and @auth/core/jwt for extracting and validating JWT session tokens from incoming requests. When no session cookie is present, getToken() falls back to reading the Authorization: Bearer header, URL-decoding the bearer value via JavaScript's native decodeURIComponent() before validating it. JavaScript's decodeURIComponent() throws a URIError on malformed percent-encoding sequences such as '%', '%A', or '%ZZ' - sequences that are syntactically invalid under RFC 3986. Because getToken() does not wrap this decode step in a try/catch, the URIError propagates as an unhandled exception through whatever route or middleware called getToken(). The root cause is CWE-20 (Improper Input Validation): attacker-controlled input is passed to a throwing function without prior validation or exception containment. Affected CPE strings are cpe:2.3:a:nextauthjs:next-auth:*:*:*:*:*:*:*:* and cpe:2.3:a:@auth:core:*:*:*:*:*:*:*:*. The fix, confirmed in the merged PR diff, wraps the decodeURIComponent() call in a try/catch that returns null for malformed tokens, matching how other invalid tokens are already handled.
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:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Unauthenticated network-accessible trigger via HTTP header requires no privileges or user interaction; impact is availability only with no confidentiality or integrity effect.
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, the exported getToken() helper in the next-auth/jwt and @auth/core/jwt modules can throw an uncaught exception when it reads a malformed Authorization: Bearer header. When no session cookie is present, getToken() URL-decodes the bearer value before validating it, and malformed percent encoding causes decodeURIComponent() to throw instead of treating the token as invalid. Because getToken() is commonly called in API routes, middleware, and server-side request handlers, a single unauthenticated request can trigger an unhandled exception in code paths that authenticate requests, causing a per-request denial of service without exposing tokens, sessions, or other data and without bypassing authentication. 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- 1 npm packages depend on @auth/core (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 0.1.0.
Executive ViewAI
NextAuth.js versions 4.0.6 through 4.24.14, 5.0.0-beta.0 through 5.0.0-beta.31, and @auth/core 0.1.0 through 0.41.2 contain a remote denial-of-service vulnerability allowing unauthenticated attackers to crash any API route using the getToken() helper with a single malformed request. Organizations using NextAuth.js face immediate service availability risk without patching.
Apply vendor patch.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Cross-tenant authorization bypass in TinaCMS self-hosted deployments allows any holder of a legitimate TinaCloud account
Provider-confusion in NextAuth.js (next-auth and @auth/core) allows an attacker to link their own OAuth identity at a ta
Supabase Auth allows remote attackers to hijack user sessions by crafting fraudulent ID tokens when Apple or Azure OAuth
EUVD-2026-57552
GHSA-xmf8-cvqr-rfgj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB