next-auth vulnerable to possible user mocking that bypasses basic authentication
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-285.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nextauthjs | next-auth | before 4.24.5 | 4.24.5 | Patch available | CNA |
| — | next-auth (npm) | before 4.24.5 | 4.24.5 | Patch available | GHSA-v64w-49xw-qq89 |
- next-auth Vendornextauthjs Affected before 4.24.5 Fixed in 4.24.5 Patch available CNA
- next-auth (npm) Vendor— Affected before 4.24.5 Fixed in 4.24.5 Patch available GHSA-v64w-49xw-qq89
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* | before 4.24.5 | Vulnerable | nextauthjs |
- cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* Versions before 4.24.5 Vulnerable ·nextauthjs
Remediation
- Fix · CNA next-auth (nextauthjs) Fixed in 4.24.5
- Fix · GHSA-v64w-49xw-qq89 next-auth (npm) Fixed in 4.24.5 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-48309
- 2026-10-03 Alias added: GHSA-v64w-49xw-qq89
References
Advisory 2
More nextauthjs Next-auth vulnerabilities
- TI-2022-13171 Improper handling of email input in next-auth CVSS 3.1HIGH 7.1
- TI-2022-16351 Verification requests (magic link) sent to unwanted emails CVSS 3.1CRITICAL 9.1
- TI-2022-13137 Improper Handling of `callbackUrl` parameter in next-auth CVSS 3.1HIGH 7.5
- TI-2023-12218 Missing proper state, nonce and PKCE checks for OAuth authentication in next-auth CVSS 3.1HIGH 8.8
- TI-2022-18639 NextAuth.js Upstash Adapter missing token verification CVSS 3.1HIGH 8.1
- TI-2021-04410 Token verification bug in next-auth CVSS 3.1MEDIUM 6.1
Sources
- CVE-2023-48309 · CVE Program
- CVE-2023-48309 · NVD
- FIRST EPSS
- GHSA-v64w-49xw-qq89 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences