CVE-2023-27490

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

HIGH
8.8
CVSS Score
Published: March 9, 2023 at 08:37 PM UTC
Updated: June 17, 2026 at 05:45 AM UTC
2 products affected across 1 vendorNext AuthJs Next Auth

Using next-auth by nextauthjs?

Get instant alerts when new vulnerabilities affect next-auth - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 0.5%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.20.1
Affected range stops below 4.20.1, so it looks safe — our inference, not a vendor statement
v < 4.20.1
Affected range stops below 4.20.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-352CWE-384

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card