CVE-2023-48309
CVE-2023-48309 is a medium-severity vulnerability in Nextauth.js Next-auth with a CVSS 3.x base score of 5.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-285.
Key facts
- Severity: Medium (CVSS 3.x base score 5.3)
- EPSS exploit prediction: 1% (49th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-285
- Affected product: Nextauth.js Next-auth
- Published:
- Last 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.
Frequently asked questions
- What is CVE-2023-48309?
- 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.
- How severe is CVE-2023-48309?
- CVE-2023-48309 has a CVSS 3.x base score of 5.3, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is low, integrity none, and availability none.
- Is CVE-2023-48309 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (49th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-48309?
- CVE-2023-48309 affects Nextauth.js Next-auth. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2023-48309?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2023-48309 published?
- CVE-2023-48309 was published on 2023-11-20 and last updated on 2026-06-17.
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
Affected products (1)
- cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*
More vulnerabilities in Nextauth.js Next-auth
- CVE-2022-35924 — Critical (CVSS 9.1): NextAuth.js is a complete open source authentication solution for Next.js applications. `next-auth` users who are using…
- CVE-2023-27490 — High (CVSS 8.1): NextAuth.js is an open source authentication solution for Next.js applications. `next-auth` applications using OAuth…
- CVE-2022-31093 — High (CVSS 7.5): NextAuth.js is a complete open source authentication solution for Next.js applications. In affected versions an…
- CVE-2022-31127 — High (CVSS 7.1): NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a…
- CVE-2022-39263 — Medium (CVSS 6.8): `@next-auth/upstash-redis-adapter` is the Upstash Redis adapter for NextAuth.js, which provides authentication for…
- CVE-2022-29214 — Medium (CVSS 6.1): NextAuth.js (next-auth) is am open source authentication solution for Next.js applications. Prior to versions 3.29.3…
All CVEs affecting Nextauth.js Next-auth →
Other CWE-285 (Improper Authorization) vulnerabilities
- CVE-2025-65041 — Critical (CVSS 10.0): Improper authorization in Microsoft Partner Center allows an unauthorized attacker to elevate privileges over a network.
- CVE-2023-33189 — Critical (CVSS 10.0): Pomerium is an identity and context-aware access proxy. With specially crafted requests, incorrect authorization…
- CVE-2022-2595 — Critical (CVSS 10.0): Improper Authorization in GitHub repository kromitgmbh/titra prior to 0.79.1.
- CVE-2021-28799 — Critical (CVSS 10.0): An improper authorization vulnerability has been reported to affect QNAP NAS running HBS 3 (Hybrid Backup Sync. ) If…
- CVE-2026-34048 — Critical (CVSS 9.9): Coolify is an open-source and self-hostable tool for managing servers, applications, and databases. Prior to…
- CVE-2026-5412 — Critical (CVSS 9.9): In Juju versions prior to 2.9.57 and 3.6.21, an authorization issue exists in the Controller facade. An authenticated…
Browse all CWE-285 (Improper Authorization) vulnerabilities →