{"cve":"CVE-2022-31093","nvd":{"published":"2022-06-27T22:15:09.047","modified":"2026-06-17T04:44:46.920","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-754"],"references":["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","https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85"],"products":["nextauth.js:next-auth"],"source":"nvd","synced_at":"2026-10-19T21:32:39.174919249+00:00"},"epss":{"cve":"CVE-2022-31093","score":0.01748,"percentile":0.77835,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-g5fm-jp9v-2432","url":"https://osv.dev/vulnerability/GHSA-g5fm-jp9v-2432","summary":"Improper Handling of `callbackUrl` parameter in next-auth","modified":"2023-11-08T04:09:25.715079Z","packages":[{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":["<3.29.5"],"fixed":["3.29.5"]},{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":[">=4.0.0 <4.5.0"],"fixed":["4.5.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}