First published: Mon Jun 27 2022(Updated: )
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.
Credit: security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
Nextauth.js Next-auth | >=3.0.0<3.29.5 | |
Nextauth.js Next-auth | >=4.0.0<4.5.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2022-31093 is a vulnerability in NextAuth.js that allows an attacker to send a request with an invalid callbackUrl, leading to a URL instantiation failure.
CVE-2022-31093 affects NextAuth.js versions 3.0.0 to 3.29.5 and versions 4.0.0 to 4.5.0.
The severity of CVE-2022-31093 is rated as high with a CVSS score of 7.5.
An attacker can exploit CVE-2022-31093 by sending a request with an invalid callbackUrl parameter.
To fix CVE-2022-31093, update NextAuth.js to a version beyond 3.29.5 or 4.5.0.