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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.81% (percentile 54, 2026-11-26)
- **CWE:** CWE-285, CWE-863
- **Aliases:** GHSA-v64w-49xw-qq89
- **Published:** 2023-11-20T18:25:01.896Z
- **Modified:** 2026-09-10T03:49:59.122Z

## Who should check

- Projects that depend on npm package next-auth (\< 4.24.5)
- Anyone running nextauthjs next-auth \< 4.24.5

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

## Affected and fixed versions

- npm `next-auth`: affected \< 4.24.5; fixed 4.24.5 (osv)
- nextauthjs next-auth: \< 4.24.5 (cvelist)

## Mitigation

- Upgrade next-auth to 4.24.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-48309. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-48309.md
Affected: next-auth < 4.24.5
Fixed in: 4.24.5

Steps:
1. Search this machine and project for next-auth (npm), nextauthjs next-auth: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-48309 being exploited?

There is no confirmed exploitation: CVE-2023-48309 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.81% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-48309?

Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-48309?

next-auth \< 4.24.5.

### Is there a fix for CVE-2023-48309?

Yes. Fixed in 4.24.5. Upgrade next-auth to 4.24.5 or later.

### How do I check if I'm affected by CVE-2023-48309?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-48309>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-v64w-49xw-qq89> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-48309> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-48309>
