Vulnerability Details : CVE-2022-31093
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.
Products affected by CVE-2022-31093
- cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*
- cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-31093
0.30%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 52 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-31093
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:N/I:N/A:P |
10.0
|
2.9
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
3.9
|
3.6
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
3.9
|
3.6
|
GitHub, Inc. |
CWE ids for CVE-2022-31093
-
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.Assigned by: security-advisories@github.com (Primary)
References for CVE-2022-31093
-
https://next-auth.js.org/configuration/initialization#advanced-initialization
Initialization | NextAuth.jsVendor Advisory
-
https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432
Improper Handling of `callbackUrl` parameter in next-auth · Advisory · nextauthjs/next-auth · GitHubMitigation;Third Party Advisory
-
https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6
test: add test for invalid `callbackUrl` handling · nextauthjs/next-auth@e498483 · GitHubPatch;Third Party Advisory
-
https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85
fix: handle invalid `callbackUrl` · nextauthjs/next-auth@25517b7 · GitHubPatch;Third Party Advisory
Jump to