{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.2.0"
                  },
                  {
                    "last_affected": "4.24.15"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          "events": [
            {
              "introduced": "f3be5e87f6fa2bdd6f633ed1adfa3bc59579eadc"
            },
            {
              "last_affected": "d857eec560fb99c8b18d3b22a2693b849a62d1c3"
            }
          ],
          "repo": "https://github.com/nextauthjs/next-auth",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-187"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/145xxx/CVE-2026-145493.json"
  },
  "details": "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.",
  "id": "CVE-2026-145493",
  "modified": "2026-12-05T03:45:32.696253052Z",
  "published": "2026-12-05T02:00:07.523Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/145xxx/CVE-2026-145493.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nextauthjs/next-auth"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/nextauthjs/next-auth/blob/next-auth%404.24.15/packages/next-auth/src/next/middleware.ts#L109-L119"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-145493"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/next-auth-4.2.0-through-4.24.15-authentication-bypass-via-withauth-middleware-path-prefix"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "next-auth 4.2.0 through 4.24.15 Authentication Bypass via withAuth Middleware Path Prefix"
}