CVE-2022-31093
JavaScript vulnerability analysis and mitigation

Overview

A high severity vulnerability (CVE-2022-31093) was discovered in NextAuth.js affecting versions <3.29.5 and <4.5.0. The vulnerability allows attackers to send requests with an invalid callbackUrl query parameter, which when internally converted to a URL object would fail due to malformed URL construction (NextAuth Advisory).

Technical details

The vulnerability occurs when processing the callbackUrl parameter in authentication requests. When an invalid URL is provided, the URL instantiation fails due to malformed input, causing an unhandled error that leads to API route handler timeout and authentication failure. The issue was discovered shortly after a similar vulnerability (GHSA-q2mx-j4x2-2h74) and affects the URL validation mechanism (NextAuth Advisory).

Impact

When exploited, this vulnerability results in authentication failures and API route handler timeouts, effectively preventing legitimate users from logging in to the application. The unhandled error condition creates a denial of service scenario for the authentication functionality (NextAuth Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 3.29.5 and 4.5.0. Users are recommended to upgrade to these versions or later. For those unable to upgrade immediately, a workaround is available using Advanced Initialization by implementing custom URL validation before passing the request to NextAuth. The maintainers recommend upgrading to v4 as v3 is considered unmaintained (NextAuth 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