NextAuth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| nextauthjs | next-auth | affected |
|
|||||||||
| @auth | core | affected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Nextauth.js | Core |
|
||||||||||||
| Nextauth.js | Next-auth |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-xmf8-cvqr-rfgj | Auth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.877% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Nextauth.js
Nextauth.js core Nextauth.js next-auth |
|
| Vendors & Products |
Nextauth.js
Nextauth.js core Nextauth.js next-auth |
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | NextAuth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers | |
| Weaknesses | CWE-20 CWE-248 |
|
| References |
|
|
| Metrics |
cvssV3_1
|