{"id":"CVE-2026-145493","aliases":["EUVD-2026-145097","GHSA-6pw8-chrv-7mqx"],"status":"published","title":"next-auth 4.2.0 through 4.24.15 Authentication Bypass via withAuth Middleware Path Prefix","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.","severity":{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","level":"medium","assessor":"cna","from":"cve","others":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","from":"ghsa"}]},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-187"],"published":"2026-12-05T02:00:07Z","modified":"2026-12-05T04:01:01Z","products":[{"vendor":"nextauth.js","product":"next-auth"},{"vendor":"nextauthjs","product":"next-auth"}],"references":[{"url":"https://github.com/nextauthjs/next-auth/blob/next-auth%404.24.15/packages/next-auth/src/next/middleware.ts#L109-L119","tags":["technical-description","article"]},{"url":"https://www.vulncheck.com/advisories/next-auth-4.2.0-through-4.24.15-authentication-bypass-via-withauth-middleware-path-prefix","tags":["third-party-advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-145493","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6pw8-chrv-7mqx"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/145xxx/CVE-2026-145493.json","tags":["advisory"]},{"url":"https://github.com/nextauthjs/next-auth","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-145493","title":"next-auth 4.2.0 through 4.24.15 Authentication Bypass via withAuth Middleware Path Prefix","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.","status":"published","published":"2026-12-05T02:00:07.523Z","modified":"2026-12-05T02:00:07.523Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","level":"medium","assessor":"cna"},{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-187"],"updated_at":"2026-12-05T02:07:01.654317Z"}],"euvd":[{"id":"EUVD-2026-145097","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.","status":"published","published":"2026-12-05T02:00:07Z","modified":"2026-12-05T02:00:07Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"updated_at":"2026-12-05T03:44:21.912352Z"}],"ghsa":[{"id":"GHSA-6pw8-chrv-7mqx","title":"next-auth 4.2.0 through 4.24.15 contains an authentication bypass vulnerability in the withAuth...","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.","status":"published","published":"2026-12-05T03:30:30Z","modified":"2026-12-05T03:30:38Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"},{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-187"],"updated_at":"2026-12-05T03:31:20.896926Z"}],"nvd":[{"id":"CVE-2026-145493","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.","status":"published","published":"2026-12-05T03:20:00.503Z","modified":"2026-12-05T03:20:00.503Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-187"],"updated_at":"2026-12-05T03:21:31.003878Z"}],"osv":[{"id":"CVE-2026-145493","title":"next-auth 4.2.0 through 4.24.15 Authentication Bypass via withAuth Middleware Path Prefix","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.","status":"published","published":"2026-12-05T02:00:07.523Z","modified":"2026-12-05T04:01:01.835193446Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-187"],"updated_at":"2026-12-05T04:14:18.806243Z"}]}}
