AploSec / Disclosures / CVE-2026-145493
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
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/next-auth-4.2.0-through-4.24.15-authentication-bypass-via-withauth-middleware-path-prefix
- Vulnerable codehttps://github.com/nextauthjs/next-auth/blob/next-auth%404.24.15/packages/next-auth/src/next/middleware.ts#L109-L119
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-145493
- 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