Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. next-auth
  4. ›
  5. GHSA-xmf8-cvqr-rfgj

GHSA-xmf8-cvqr-rfgj: Auth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers

July 23, 2026 (updated August 13, 2026)

The exported getToken() helper (next-auth/jwt and @auth/core/jwt) 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 the decode step to throw rather than being treated as an invalid token. Because getToken() is commonly called in API routes, middleware, and other request handlers, a single unauthenticated request can trigger an unhandled exception in code paths that authenticate requests.

References

  • github.com/advisories/GHSA-xmf8-cvqr-rfgj
  • github.com/nextauthjs/next-auth/commit/5bca2399a79ba8d116ca5179b4b1ebcd152e7f05
  • github.com/nextauthjs/next-auth/commit/e707770f00c52b3479e43422b0200b059149ed53
  • github.com/nextauthjs/next-auth/pull/13467
  • github.com/nextauthjs/next-auth/pull/13469
  • github.com/nextauthjs/next-auth/releases/tag/@auth/core@0.41.3
  • github.com/nextauthjs/next-auth/releases/tag/next-auth@4.24.15
  • github.com/nextauthjs/next-auth/releases/tag/next-auth@5.0.0-beta.32
  • github.com/nextauthjs/next-auth/security/advisories/GHSA-xmf8-cvqr-rfgj
  • nvd.nist.gov/vuln/detail/CVE-2026-73418

Code Behaviors & Features

Detect and mitigate GHSA-xmf8-cvqr-rfgj with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 4.0.6 before 4.24.15, all versions starting from 5.0.0-beta.0 before 5.0.0-beta.32

Fixed versions

  • 4.24.15
  • 5.0.0-beta.32

Solution

Upgrade to versions 4.24.15, 5.0.0-beta.32 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation

Source file

npm/next-auth/GHSA-xmf8-cvqr-rfgj.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:49 +0000.