Read the docs
TI-2023-12218 Aliases CVE-2023-27490GHSA-7r7x-4c4q-c4qf

Missing proper state, nonce and PKCE checks for OAuth authentication in next-auth

Priority MEDIUM 41CWE-352Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Tampering, Spoofing
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-352 and CWE-384.

Summary

NextAuth.js is an open source authentication solution for Next.js applications. `next-auth` applications using OAuth provider versions before `v4.20.1` have been found to be subject to an authentication vulnerability. A bad actor who can read traffic on the victim's network or who is able to social engineer the victim to click a manipulated login link could intercept and tamper with the authorization URL to **log in as the victim**, bypassing the CSRF protection. This is due to a partial failure during a compromised OAuth session where a session code is erroneously generated. This issue has been addressed in version 4.20.1. Users are advised to upgrade. Users unable to upgrade may using Advanced Initialization, manually check the callback request for state, pkce, and nonce against the provider configuration to prevent this issue. See the linked GHSA for details.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00538 45th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed next-auth (nextauthjs): 4.20.1next-auth (npm): 4.20.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
nextauthjsnext-authbefore 4.20.14.20.1Patch availableCNA
—next-auth (npm)before 4.20.14.20.1Patch availableGHSA-7r7x-4c4q-c4qf
  • next-auth Vendornextauthjs Affected before 4.20.1 Fixed in 4.20.1 Patch available CNA
  • next-auth (npm) Vendor— Affected before 4.20.1 Fixed in 4.20.1 Patch available GHSA-7r7x-4c4q-c4qf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*before 4.20.1Vulnerablenextauthjs
  • cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* Versions before 4.20.1 Vulnerable ·nextauthjs

Remediation

  • Fix · CNA next-auth (nextauthjs) Fixed in 4.20.1
  • Fix · GHSA-7r7x-4c4q-c4qf next-auth (npm) Fixed in 4.20.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-27490
  2. 2026-10-03 Alias added: GHSA-7r7x-4c4q-c4qf

References

  • 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-2022-18639 NextAuth.js Upstash Adapter missing token verification CVSS 3.1HIGH 8.1
  • TI-2023-26172 next-auth vulnerable to possible user mocking that bypasses basic authentication CVSS 3.1MEDIUM 5.3
  • TI-2021-04410 Token verification bug in next-auth CVSS 3.1MEDIUM 6.1
See all 8 →

Sources