Improper Handling of `callbackUrl` parameter in next-auth
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
next-authnpm | < 3.29.5 | 3.29.5 |
next-authnpm | >= 4.0.0, < 4.5.0 | 4.5.0 |
Affected products
2- Range: < 3.29.5
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-g5fm-jp9v-2432ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-31093ghsaADVISORY
- github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85ghsax_refsource_MISCWEB
- github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6ghsax_refsource_MISCWEB
- github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432ghsax_refsource_CONFIRMWEB
- next-auth.js.org/configuration/initializationghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.