CVE-2022-31093
published high CVSS 3.1 · 7.5Improper Handling of `callbackUrl` parameter in next-auth
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nextauthjs | — | next-auth< 3.29.5 · >= 4.0.0, < 4.5.0 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nextauthjs | next-auth | < 3.29.5 (affected)>= 4.0.0, < 4.5.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-754 CWE-754: Improper Check for Unusual or Exceptional Conditions
References
4- https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85
- https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432
- https://next-auth.js.org/configuration/initialization#advanced-initialization
Provider assertions
3GitHub_M · cna
Improper Handling of `callbackUrl` parameter in next-auth
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 8269f84b3faa95b24920bb470e13025515ef59b684fba27fc9aa49c82f6618ae
- Ingested
- 23 Sep 2026, 08:00:25 UTC
- Source record
- Official CVE record