GHSA-g5fm-jp9v-2432 · Severity: high · Ecosystem: npm — Improper Handling of `callbackUrl` parameter in next-auth
NextAuth.js is a complete open source authentication solution for Next.js applications. In affected versions an attacker can send a request to an app using NextAuth.js with an invalid `callbackUrl` query parameter, which internally is converted to a `URL` object. The URL instantiation would fail due to a malformed URL being passed into the constructor, causing it to throw an unhandled error which led to the **API route handler timing out and logging in to fail**. This has been remedied in versions 3.29.5 and 4.5.0. If for some reason you cannot upgrade, the workaround requires you to rely on Advanced Initialization. Please see the documentation for more.
Conclusion & alert: CVE-2022-31093 is rated Moderate Risk (53.8/100): CVSS High severity, with medium exploitation likelihood (EPSS 1.31%). Mandatory action: Review affected assets and schedule remediation.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.86% | 1.31% | +0.44% |
| 2 | 2025-07-02 | 0.72% | 0.86% | +0.15% |
| 3 | 2025-06-29 | — | 0.72% | — |
Full EPSS history (12 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 7.5 | 3.1 | HIGH |
|
3.9 | 3.6 | [email protected] |
| 7.5 | 3.1 | HIGH |
|
3.9 | 3.6 | [email protected] |
| 5.0 | 2.0 | MEDIUM |
|
10.0 | 2.9 | [email protected] |
GHSA-g5fm-jp9v-2432 · Severity: high · Ecosystem: npm — Improper Handling of `callbackUrl` parameter in next-auth
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| nextauth.js | next-auth | >= 3.0.0, < 3.29.5 | cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* |
| nextauth.js | next-auth | >= 4.0.0, < 4.5.0 | cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* |
| URL | Tags |
|---|---|
| https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85 | Patch Third Party Advisory |
| https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6 | Patch Third Party Advisory |
| https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432 | Mitigation Third Party Advisory |
| https://next-auth.js.org/configuration/initialization#advanced-initialization | Vendor Advisory |