CVE-2023-27490
JavaScript vulnerability analysis and mitigation

Overview

NextAuth.js, an open source authentication solution for Next.js applications, versions before v4.20.1 were found to contain an authentication vulnerability. The vulnerability was discovered and disclosed in March 2023, affecting applications using OAuth provider. The vulnerability allows a malicious actor who can read traffic on the victim's network or social engineer the victim to click a manipulated login link to intercept and tamper with the authorization URL to log in as the victim, bypassing the CSRF protection (GHSA Advisory, NVD).

Technical details

The vulnerability occurs due to a partial failure during a compromised OAuth session where a session code is erroneously generated. The attack involves intercepting the authorization URL created by next-auth, stripping away the OAuth checks (nonce, state, pkce), and returning the modified URL to the victim's browser. When the victim attempts to log in, the Authorization Server accepts the request and generates a code that the attacker can later use to gain unauthorized access (GHSA Advisory). The vulnerability has a CVSS score of 8.1, indicating high severity (NVD).

Impact

Successful exploitation of this vulnerability could lead to an attacker being able to log in as the victim, potentially accessing sensitive information, adding or modifying data, or causing a Denial of Service (DoS). The attacker could gain unauthorized access to the victim's account by intercepting and manipulating the authentication process (NetApp Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 4.20.1 of NextAuth.js. Users are strongly advised to upgrade to this version or later. For users unable to upgrade, a workaround is available using Advanced Initialization, where developers can manually check the callback request for state, pkce, and nonce against the provider configuration, and abort the sign-in process if there is a mismatch (GHSA Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59532HIGH8.6
  • JavaScriptJavaScript
  • @openai/codex
NoYesSep 22, 2025
CVE-2025-59430HIGH8.2
  • JavaScriptJavaScript
  • @meshconnect/web-link-sdk
NoYesSep 22, 2025
CVE-2025-59433MEDIUM5.3
  • JavaScriptJavaScript
  • @conventional-changelog/git-client
NoYesSep 22, 2025
CVE-2025-59526LOW2.7
  • JavaScriptJavaScript
  • mailgen
NoYesSep 22, 2025
GHSA-g38c-wxjf-xrh6HIGHN/A
  • JavaScriptJavaScript
  • git-commiters
NoYesSep 22, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management