# CVE-2023-48309: next-auth vulnerable to possible user mocking that bypasses basic authentication

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.81%, higher than 54% of CVEs (2026-11-30)
- Published: 2023-11-20T18:25:01.896Z
- Modified: 2026-09-10T03:49:59.122Z
- Also known as: GHSA-v64w-49xw-qq89
- Weaknesses: CWE-285, CWE-863
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- nextauthjs next-auth: < 4.24.5
- next-auth (npm): before 4.24.5
- nextauth.js next-auth: before 4.24.5

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89> (vendor-advisory, web)
- <https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10> (patch, web)
- <https://authjs.dev/guides/basics/role-based-access-control> (technical-description, web)
- <https://next-auth.js.org/configuration/nextjs#advanced-usage> (technical-description, web)
- <https://next-auth.js.org/configuration/nextjs#middlewar> (technical-description, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-48309> (advisory)
- <https://github.com/nextauthjs/next-auth> (package)

## Sources

- CVE List: [CVE-2023-48309](https://www.cve.org/CVERecord?id=CVE-2023-48309), CVE Terms of Use, modified 2024-08-29
- GitHub Advisory Database: [GHSA-v64w-49xw-qq89](https://github.com/advisories/GHSA-v64w-49xw-qq89), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-48309](https://nvd.nist.gov/vuln/detail/CVE-2023-48309), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-48309 · Whole record: https://cve.day/CVE-2023-48309.json · Rebuilt by cve.day 2026-11-25T22:58:30.611Z
