CVE-2023-27490CWE-352CWE-384

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

High · published March 9, 2023

CVSS v3.1
8.1
EPSS
1%
Percentile
44.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
8.1 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00538 · 44.5th percentile
Weaknesses
CWE-352 · Cross-Site Request Forgery (CSRF); CWE-384 · Session Fixation
Published
2023-03-09T20:37Z
EPSS history
Timeline
  • 09 MAR 20:37Z
    Missing proper state, nonce and PKCE checks for OAuth authentication in next-auth
    cvelistv5