Vulnerability Name:

CVE-2022-31093 (CCN-229667)

Assigned:2022-06-22
Published:2022-06-22
Updated:2022-07-07
Summary: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 v3 Severity:7.5 High (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
6.5 Medium (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): High
7.5 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
6.5 Medium (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): High
CVSS v2 Severity:5.0 Medium (CVSS v2 Vector: AV:N/AC:L/Au:N/C:N/I:N/A:P)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (Au): None
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): Partial
7.8 High (CCN CVSS v2 Vector: AV:N/AC:L/Au:N/C:N/I:N/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): None
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): Complete
Vulnerability Type:CWE-754
Vulnerability Consequences:Denial of Service
References:Source: MITRE
Type: CNA
CVE-2022-31093

Source: XF
Type: UNKNOWN
nodejs-cve202231093-dos(229667)

Source: MISC
Type: Patch, Third Party Advisory
https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85

Source: CCN
Type: nextauthjs GIT Repository
fix: don't show error on relative callbackUrl

Source: MISC
Type: Patch, Third Party Advisory
https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6

Source: CONFIRM
Type: Mitigation, Third Party Advisory
https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432

Source: MISC
Type: Vendor Advisory
https://next-auth.js.org/configuration/initialization#advanced-initialization

Source: CCN
Type: SNYK-JS-NEXTAUTH-2933545
Denial of Service (DoS)

Source: CCN
Type: Mend Vulnerability Database
CVE-2022-31093

Vulnerable Configuration:Configuration 1:
  • cpe:/a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* (Version >= 4.0.0 and < 4.5.0)
  • OR cpe:/a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* (Version >= 3.0.0 and < 3.29.5)

  • Configuration CCN 1:
  • cpe:/a:nodejs:node.js:*:*:*:*:-:*:*:*

  • * Denotes that component is vulnerable
    BACK
    nextauth.js next-auth *
    nextauth.js next-auth *
    nodejs node.js *