CVE-2022-31093: NextAuth.js - Denial of Service
- Cve: CVE-2022-31093
- Name: NextAuth.js - Denial of Service
- 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.
- Impact: Attackers can cause denial of service by triggering API route timeouts and login failures.
- Remediation: Upgrade to version 3.29.5 or 4.5.0. Alternatively, implement Advanced Initialization as per documentation.
- Vulnerability impact: denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.01775
- Epss percentile: 0.78782
- Assignee: [email protected]
- Published at: 2022-06-27T22:15:09Z
- Age in days: 1611
- Modified at: 2026-06-17T04:44:46Z
- Patch available: yes
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-31093
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: vulnerability type, requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-754 | Improper Check for Unusual or Exceptional Conditions |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/nextauthjs/next-auth/commit/25517b73153332d948114bacdff3b5908de91d85 | Patch, Third Party Advisory |
| https://github.com/nextauthjs/next-auth/commit/e498483b23273d1bfc81be68339607f88d411bd6 | Patch, Third Party Advisory |
| https://next-auth.js.org/configuration/initialization#advanced-initialization | Vendor Advisory |
| https://github.com/nextauthjs/next-auth/security/advisories/GHSA-g5fm-jp9v-2432 | Mitigation, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| nextauth.js:next-auth | >= 4.0.0, < 4.5.0; >= 3.0.0, < 3.29.5 | no | nvd | /v1/products/nextauth.js/next-auth |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| nextauthjs/next-auth | commit, fix, package, security_advisory | yes | /v1/repositories/nextauthjs/next-auth |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts