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.
Published: 2026-08-12
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability causes the exported getToken() helper in NextAuth.js to throw an uncaught exception when processing a malformed Authorization: Bearer header. This occurs because a malformed percent encoding triggers JavaScript's decodeURIComponent to error instead of treating the token as invalid. The resulting exception propagates to API routes, middleware or server‑side request handlers, resulting in a per‑request denial of service without leaking any sensitive data.

Affected Systems

Vulnerable versions of @auth/core up to 0.41.2 and next‑auth before 4.24.15 or 5.0.0‑beta.32 are affected. The issue applies to any Next.js application that utilizes the getToken() helper for authentication, typically within API routes, middleware or server‑side rendering logic.

Risk and Exploitability

With a CVSS score of 7.5 the issue is classified as high severity, and the EPSS score is not available, indicating low publicly reported exploitation activity. The vulnerability is not listed in CISA KEV. An attacker with network access can craft an HTTP request containing a malformed Bearer token to trigger the exception, which can be performed remotely and without needing a valid session or authentication.

Generated by OpenCVE AI on August 12, 2026 at 23:11 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update @auth/core to version 0.41.3 or later and next-auth to 4.24.15 or 5.0.0‑beta.32.
  • Run integration tests to confirm that getToken() is invoked within a try/catch block or that authentication logic no longer relies on the unpatched helper.
  • Enable application monitoring to capture any uncaught exception logs and apply rate limiting to traffic with malformed Authorization headers as a temporary defensive measure.

Generated by OpenCVE AI on August 12, 2026 at 23:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-xmf8-cvqr-rfgj Auth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers
History

Thu, 13 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 13 Aug 2026 10:15:00 +0000

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

Wed, 12 Aug 2026 20:30:00 +0000

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

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

Nextauth.js Core Next-auth
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-13T12:53:44.683Z

Reserved: 2026-08-12T14:32:11.795Z

Link: CVE-2026-73418

cve-icon Vulnrichment

Updated: 2026-08-13T12:53:35.980Z

cve-icon NVD

Status : Received

Published: 2026-08-12T21:17:40.890

Modified: 2026-08-13T13:19:17.513

Link: CVE-2026-73418

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T09:47:56Z

Weaknesses