CVE-2022-31093Improper Handling of `callbackUrl` parameter in next-auth
- 7.5HighCVSS base score
- 1.7%Exploitation in 30 daysEPSS · top 22% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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.
Timeline
ID reserved
By GitHub_M
- 40 days later
· 40 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 1.7% · top 22% of all CVEs (15 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Affected products
- affected < 3.29.5
- affected >= 4.0.0, < 4.5.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmnext-authGHSA-g5fm-jp9v-2432 (opens in a new tab)
References
References4
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6 (opens in a new tab)x_refsource_MISCx_transferred
- https://next-auth.js.org/configuration/initialization#advanced-initialization (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-6046 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-g5fm-jp9v-2432 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-31093)Record last updated .