# CVE-2022-31093: Improper Handling of `callbackUrl` parameter in next-auth

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.85%, higher than 80% of CVEs (2026-11-30)
- Published: 2022-06-21T20:06:36.000Z
- Modified: 2026-06-17T04:44:46.920Z
- Also known as: GHSA-g5fm-jp9v-2432
- Weaknesses: CWE-754
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- nextauthjs next-auth: < 3.29.5; >= 4.0.0, < 4.5.0
- next-auth (npm): before 3.29.5; from 4.0.0 before 4.5.0
- nextauth.js next-auth: from 3.0.0 before 3.29.5; from 4.0.0 before 4.5.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432> (mitigation, third-party-advisory, web)
- <https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85> (patch, third-party-advisory, web)
- <https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6> (patch, third-party-advisory, web)
- <https://next-auth.js.org/configuration/initialization#advanced-initialization> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31093> (advisory)
- <https://github.com/nextauthjs/next-auth> (package)

## Sources

- CVE List: [CVE-2022-31093](https://www.cve.org/CVERecord?id=CVE-2022-31093), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-g5fm-jp9v-2432](https://github.com/advisories/GHSA-g5fm-jp9v-2432), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-31093](https://nvd.nist.gov/vuln/detail/CVE-2022-31093), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31093 · Whole record: https://cve.day/CVE-2022-31093.json · Rebuilt by cve.day 2026-11-25T22:58:12.599Z
