Improper authorization in nextauthjs next-auth
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-285.
Summary
NextAuth.js provides authentication for Next.js. From next-auth 5.0.0-beta.0 until 5.0.0-beta.32, applications that gate access by checking only for the existence of the auth object returned by the auth() wrapper can fail open when Auth.js has a server configuration error. In middleware, Route Handlers, React Server Components, and other auth() entry points, a non-OK session response is parsed into a truthy error object instead of null, so checks such as !!auth and if (req.auth) evaluate to true for unauthenticated requests. A provider missing both the issuer and authorization endpoint triggers InvalidEndpoints, and an unset AUTH_SECRET or another server configuration error can produce the same behavior. There is no impact while configuration is valid, but after a deployment becomes misconfigured, routes protected only by session existence silently grant access to every visitor. This issue is fixed in next-auth 5.0.0-beta.32.
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 | 5.0.0-beta.4 to before 5.0.0-beta.32 | 5.0.0-beta.32 | Patch available | CNA |
| — | next-auth (npm) | 5.0.0-beta.0 to before 5.0.0-beta.32 | 5.0.0-beta.32 | Patch available | GHSA-8fpg-xm3f-6cx3 |
- next-auth Vendornextauthjs Affected 5.0.0-beta.4 to before 5.0.0-beta.32 Fixed in 5.0.0-beta.32 Patch available CNA
- next-auth (npm) Vendor— Affected 5.0.0-beta.0 to before 5.0.0-beta.32 Fixed in 5.0.0-beta.32 Patch available GHSA-8fpg-xm3f-6cx3
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:*:*:* | — | — | nextauthjs |
- cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:*:*:* Versions — — ·nextauthjs
Remediation
- Fix · CNA next-auth (nextauthjs) Fixed in 5.0.0-beta.32
- Fix · GHSA-8fpg-xm3f-6cx3 next-auth (npm) Fixed in 5.0.0-beta.32 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-73421
- 2026-10-03 Alias added: GHSA-8fpg-xm3f-6cx3
- 2026-10-21 EPSS moved to the 50th–90th percentile
References
More nextauthjs 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-2026-51538 NextAuth.js: Email normalizer validates the address before Unicode normalization, allowing a homoglyph @ bypass CVSS 4.0CRITICAL 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-2026-51536 NextAuth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers CVSS 3.1HIGH 7.5
Sources
- CVE-2026-73421 · CVE Program
- CVE-2026-73421 · NVD
- FIRST EPSS
- GHSA-8fpg-xm3f-6cx3 · 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