CVE-2026-73418: CWE-20: Improper Input Validation in nextauthjs next-auth
NextAuth.js versions prior to @auth/core 0.41.3, next-auth 4.24.15, and 5.0.0-beta.32 contain a vulnerability in the getToken() helper that causes an unhandled exception when processing malformed Authorization: Bearer headers. This occurs due to improper input validation and URL decoding of bearer tokens, leading to decodeURIComponent() throwing an exception. The flaw can cause a denial of service by crashing request handlers that authenticate requests, without exposing sensitive data or bypassing authentication. The issue is fixed in the specified patched versions.
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 versions prior to @auth/core 0.41.3, next-auth 4.24.15, and 5.0.0-beta.32 contain a vulnerability in the getToken() helper that causes an unhandled exception when processing malformed Authorization: Bearer headers. This occurs due to improper input validation and URL decoding of bearer tokens, leading to decodeURIComponent() throwing an exception. The flaw can cause a denial of service by crashing request handlers that authenticate requests, without exposing sensitive data or bypassing authentication. The issue is fixed in the specified patched versions.
CVSS v3.1
Score 7.5high
Affected software
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
- Remediation Level
- null
Threat ID: 6a7cd702bf8831d5391e9f12
Added to database: 08/12/2026, 20:26:42 UTC
Last enriched: 08/12/2026, 20:42:20 UTC
Last updated: 08/13/2026, 01:33:15 UTC
Views: 5
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.