{"id":"GHSA-v64w-49xw-qq89","revision":null,"records":[{"revision":"9466cda547884619a3d43863760bc8da","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2023-48309","aliases":[],"title":"next-auth vulnerable to possible user mocking that bypasses basic authentication","description":"NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users' data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). `next-auth` `v4.24.5` contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication.","state":0,"publishedAt":"2023-11-20T18:25:01.896+00:00","modifiedAt":"2024-08-29T13:41:03.796+00:00","affected":[{"ecosystem":"Vendor product","name":"next-auth","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"nextauthjs\",\n                    \"product\": \"next-auth\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 4.24.5\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89","https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10","https://authjs.dev/guides/basics/role-based-access-control","https://next-auth.js.org/configuration/nextjs#advanced-usage","https://next-auth.js.org/configuration/nextjs#middlewar"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2023-48309","license":"CVE Program Terms of Use","key":"cve-program:CVE-2023-48309","identifiers":["CVE-2023-48309"]},"retained":false,"historicalAffected":[]},{"revision":"275d3a690b564feab9677047a6669d89","observedAt":"2026-11-17T02:48:27.698+00:00","statement":{"source":"euvd","id":"EUVD-2023-3038","aliases":["CVE-2023-48309","GHSA-v64w-49xw-qq89"],"title":"NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hol…","description":"NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users' data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). `next-auth` `v4.24.5` contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"severity":null}],"references":["https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89","https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10","https://authjs.dev/guides/basics/role-based-access-control","https://next-auth.js.org/configuration/nextjs#advanced-usage","https://next-auth.js.org/configuration/nextjs#middlewar"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-3038","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Nov 20, 2023, 6:25:01 PM","dateUpdated":"Aug 29, 2024, 1:41:03 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2023-3038","identifiers":["EUVD-2023-3038","CVE-2023-48309","GHSA-v64w-49xw-qq89"]},"retained":false,"historicalAffected":[]},{"revision":"fb6ebd2407f7463383a8920562b107ef","observedAt":"2026-10-24T22:17:33.701+00:00","statement":{"source":"nvd","id":"CVE-2023-48309","aliases":[],"title":"NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hol…","description":"NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users' data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). `next-auth` `v4.24.5` contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication.","state":0,"publishedAt":"2023-11-20T19:15:09.243+00:00","modifiedAt":"2026-06-17T06:33:58.71+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://authjs.dev/guides/basics/role-based-access-control","https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10","https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89","https://next-auth.js.org/configuration/nextjs#advanced-usage","https://next-auth.js.org/configuration/nextjs#middlewar"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2023-48309","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-285","CWE-863"],"productCriteria":["cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2023-11-20T19:15:09.243","lastModified":"2026-06-17T06:33:58.710"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2023-48309","identifiers":["CVE-2023-48309"]},"retained":false,"historicalAffected":[]},{"revision":"144ebb377d5e4020be536715ccf70f63","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-v64w-49xw-qq89","aliases":["CVE-2023-48309"],"title":"Possible user mocking that bypasses basic authentication","description":"### Impact\n\n`next-auth` applications prior to version **4.24.5** that rely on the default [Middleware authorization](https://next-auth.js.org/configuration/nextjs#middleware) are affected.\n\nA bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce).\n\nManually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string).\n\nThis vulnerability does **not** give access to other users' data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.)\n\nThis vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout).\n\n_Note: Regardless of the vulnerability, the existence of a NextAuth.js session state can provide simple authentication, but not authorization in your applications. For role-based access control, you can check out [our guide](https://authjs.dev/guides/basics/role-based-access-control)._\n\n### Patches\n\nWe patched the vulnerability in `next-auth` `v4.24.5`. To upgrade, run one of the following:\n\n```\nnpm i next-auth@latest\n```\n```\nyarn add next-auth@latest\n```\n```\npnpm add next-auth@latest\n```\n\n### Workarounds\n\nUpgrading to `latest` is the recommended way to fix this issue. However, using [a custom authorization callback for Middleware](https://next-auth.js.org/configuration/nextjs#advanced-usage), developers can manually do a basic authentication:\n\n```ts\n// middleware.ts\nimport { withAuth } from \"next-auth/middleware\"\n\nexport default withAuth(/*your middleware function*/, {\n  // checking the existence of any property - besides `value` which might be a random string - on the `token` object is sufficient to prevent this vulnerability\n  callbacks: { authorized: ({ token }) => !!token?.email }\n})\n```\n\n### References\n\n- [NextAuth.js Middleware](https://next-auth.js.org/configuration/nextjs#middleware)\n- [Role-based access contorl (RBAC) guide](https://authjs.dev/guides/basics/role-based-access-control)","state":0,"publishedAt":"2023-11-20T23:25:36+00:00","modifiedAt":"2026-09-10T03:49:59.1220751+00:00","affected":[{"ecosystem":"npm","name":"next-auth","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.24.5"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89","https://nvd.nist.gov/vuln/detail/CVE-2023-48309","https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10","https://authjs.dev/guides/basics/role-based-access-control","https://github.com/nextauthjs/next-auth","https://next-auth.js.org/configuration/nextjs#advanced-usage","https://next-auth.js.org/configuration/nextjs#middlewar"],"sourceUrl":"https://github.com/advisories/GHSA-v64w-49xw-qq89","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-v64w-49xw-qq89","identifiers":["GHSA-v64w-49xw-qq89","CVE-2023-48309"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:37.372166+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.3721666+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-0e69c6613585444f641c92f526100c36dd9cd3e99fef2d7247efc88cf506728d","complete":true,"records":428229,"lastAttemptAt":"2026-11-19T04:22:50.7413942+00:00","lastSuccessAt":"2026-11-19T04:22:50.7221018+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.7413942+00:00","snapshotPublishedAt":"2026-11-19T03:23:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-0aa7483267c148338cf702fa047c0624","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T04:29:25.430896+00:00","lastSuccessAt":"2026-11-19T04:29:25.5480596+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:29:25.5480596+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:38.0697004+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:38.0697013+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T04:24:39.3964736+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T04:24:37.034158+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.034158+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T04:22:50.8981544+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.8981544+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T04:24:37.1431899+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.1431899+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2556fa291ec863b7fd77332e55dcff5569878e06b48ea32c182e52878cdd1ce8","complete":true,"records":232702,"lastAttemptAt":"2026-11-19T04:24:36.8996689+00:00","lastSuccessAt":"2026-11-19T04:24:35.8955272+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:36.8996689+00:00","snapshotPublishedAt":"2026-11-19T03:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}