{"cve":"CVE-2023-48309","nvd":{"published":"2023-11-20T19:15:09.243","modified":"2026-06-17T06:33:58.710","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"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},"cwes":["CWE-285","CWE-863"],"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"],"products":["nextauth.js:next-auth"],"source":"nvd","synced_at":"2026-10-19T21:42:07.670898610+00:00"},"epss":{"cve":"CVE-2023-48309","score":0.007,"percentile":0.53212,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-v64w-49xw-qq89","url":"https://osv.dev/vulnerability/GHSA-v64w-49xw-qq89","summary":"Possible user mocking that bypasses basic authentication","modified":"2026-09-10T03:49:59.122075128Z","packages":[{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":["<4.24.5"],"fixed":["4.24.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}