CVE-2026-73418: CWE-20: Improper Input Validation in nextauthjs next-auth
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.
AI Analysis
Technical Summary
NextAuth.js, an authentication library for Next.js, has an input validation vulnerability (CWE-20) in the getToken() helper function exported by next-auth/jwt and @auth/core/jwt modules. When no session cookie is present, getToken() URL-decodes the bearer token from the Authorization header. Malformed percent-encoding in the token causes decodeURIComponent() to throw an uncaught exception instead of treating the token as invalid. Because getToken() is commonly used in API routes, middleware, and server-side handlers, this can cause a denial of service by crashing these processes on a single unauthenticated request. The vulnerability does not expose tokens, sessions, or data, nor does it bypass authentication. It is fixed in @auth/core 0.41.3, next-auth 4.24.15, and 5.0.0-beta.32.
Potential Impact
An attacker can cause a denial of service by sending a single unauthenticated request with a malformed Authorization: Bearer header, triggering an unhandled exception in server-side authentication code. This disrupts service availability but does not compromise confidentiality or integrity of tokens or sessions, nor does it allow authentication bypass.
Mitigation Recommendations
This vulnerability is fixed in @auth/core version 0.41.3, next-auth version 4.24.15, and 5.0.0-beta.32. Users should upgrade to these or later versions to remediate the issue. No other mitigation is required as the vulnerability is addressed by the official fix.
CVE-2026-73418: CWE-20: Improper Input Validation in nextauthjs next-auth
Description
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.
CVSS v3.1
Score 7.5high
Affected software
nextauthjs
next-auth
@auth
core
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
NextAuth.js, an authentication library for Next.js, has an input validation vulnerability (CWE-20) in the getToken() helper function exported by next-auth/jwt and @auth/core/jwt modules. When no session cookie is present, getToken() URL-decodes the bearer token from the Authorization header. Malformed percent-encoding in the token causes decodeURIComponent() to throw an uncaught exception instead of treating the token as invalid. Because getToken() is commonly used in API routes, middleware, and server-side handlers, this can cause a denial of service by crashing these processes on a single unauthenticated request. The vulnerability does not expose tokens, sessions, or data, nor does it bypass authentication. It is fixed in @auth/core 0.41.3, next-auth 4.24.15, and 5.0.0-beta.32.
Potential Impact
An attacker can cause a denial of service by sending a single unauthenticated request with a malformed Authorization: Bearer header, triggering an unhandled exception in server-side authentication code. This disrupts service availability but does not compromise confidentiality or integrity of tokens or sessions, nor does it allow authentication bypass.
Mitigation Recommendations
This vulnerability is fixed in @auth/core version 0.41.3, next-auth version 4.24.15, and 5.0.0-beta.32. Users should upgrade to these or later versions to remediate the issue. No other mitigation is required as the vulnerability is addressed by the official fix.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-12T14:32:11.795Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a7cd702bf8831d5391e9f12
Added to database: 08/12/2026, 20:26:42 UTC
Last enriched: 08/12/2026, 20:42:20 UTC
Last updated: 09/25/2026, 01:47:44 UTC
Views: 52
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.