next-auth 4.2.0 through 4.24.15 Authentication Bypass via withAuth Middleware Path Prefix
- CVE-2026-145493
- EUVD-2026-145097
Summary
next-auth versions 4.2.0 through 4.24.15 contain an authentication bypass in the withAuth middleware handleMiddleware function. The function uses unbounded startsWith prefix checks, so an unauthenticated attacker can request routes such as /api/authors or /_next-admin, which skip session checks and the authorized callback. This lets requests reach routes that the middleware is meant to protect. The record gives a CVSS score of 4.8, and it is not listed in the CISA known exploited vulnerabilities catalog.
AI summary · verify against the vendor advisory
Description
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.
Text from the CVE.org record.
Recommendation
No source states a fixed version. Check the vendor advisory.
Affected
NextAuth.js next-auth
Affected versions Fixed in from 4.2.0 up to 4.24.15 none stated
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.