CVE-2023-48309next-auth vulnerable to possible user mocking that bypasses basic authentication
- 5.3MediumCVSS base score
- 0.70%Exploitation in 30 daysEPSS · top 46% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 6 days later
· 6 days later
Published
- 9 months later
· 9 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.70% · top 46% of all CVEs (15 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.3.
Affected products
- affected < 4.24.5
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmnext-authGHSA-v64w-49xw-qq89 (opens in a new tab)
References
References5
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10 (opens in a new tab)x_refsource_MISCx_transferred
- https://authjs.dev/guides/basics/role-based-access-control (opens in a new tab)x_refsource_MISCx_transferred
- https://next-auth.js.org/configuration/nextjs#advanced-usage (opens in a new tab)x_refsource_MISCx_transferred
- https://next-auth.js.org/configuration/nextjs#middlewar (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2023-3038 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-v64w-49xw-qq89 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-48309)Record last updated .