AploSec / Disclosures / CVE-2026-145493

Medium 4.8ReportedNo fix listedCWE-187npm

next-auth 4.2.0 through 4.24.15 Authentication Bypass via withAuth Middleware Path Prefix

CVE-2026-145493 · published 2026-12-05

Summary

CVE-2026-145493 affects next-auth (npm) 4.2.0 to 4.24.15: Authentication Bypass via withAuth Middleware Path Prefix (CWE-187). No fixed release is listed. CVSS 3.1 base score 4.8 (Medium), assigned by VulnCheck. Published 2026-12-05 by VulnCheck. Credit: Zachariah Mithani (AploSec).

next-auth 4.2.0 through 4.24.15 contains an authentication bypass vulnerability in the withAuth middleware handleMiddleware function due to unbounded startsWith prefix checks. Unauthenticated attackers can request routes like /api/authors or /_next-admin to skip session checks and the authorized callback, reaching middleware-protected routes.

Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

References

Severity
Medium 4.8CVSS 3.1, scored by VulnCheck in the CVE record
Package
next-auth
Ecosystem
npm
Affected
4.2.0 to 4.24.15
Fixed
None
Weakness
CWE-187
CNA
VulnCheck
Credit
Zachariah Mithani (AploSec)finder