LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31093: Improper Handling of `callbackUrl` parameter in next-auth

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.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A malformed callback URL can break vulnerable NextAuth.js login handling. An unauthenticated remote request may cause the authentication API route to time out, preventing users from signing in. The provided sources describe this as an availability issue, not data theft or account takeover.

Executive priority

Treat as high priority for apps where login availability is business-critical. The expected impact is denial of login, so remediation should focus on customer-facing portals, admin consoles, and operational systems that depend on NextAuth.js authentication.

Technical view

Affected next-auth versions mishandle an invalid callbackUrl query parameter. The value is converted to a URL object; malformed input can throw an unhandled error, causing the API route handler to time out. Fixed in 3.29.5 and 4.5.0. CWE-754, CVSS 7.5.

Likely exposure

Exposure exists in Next.js applications using next-auth versions below 3.29.5, or 4.0.0 through below 4.5.0, with reachable authentication API routes. Public login flows face the clearest business impact because sign-in can fail.

Exploitation context

The CVE is network-reachable, low-complexity, unauthenticated, and requires no user interaction. The source bundle does not show CISA KEV listing or active exploitation evidence, so exploitation in the wild is not confirmed here.

Researcher notes

The vulnerability is CWE-754 improper handling of exceptional conditions. Evidence supports availability impact only: no confidentiality or integrity impact is stated. Fix evidence is tied to the GitHub advisory and linked commits for v3 and v4 branches.

Mitigation direction

  • Upgrade next-auth to 3.29.5, 4.5.0, or later supported releases.
  • If upgrading is blocked, review the vendor Advanced Initialization workaround.
  • Prioritize internet-facing authentication routes and high-traffic customer login flows.
  • Monitor authentication route timeouts and unusual callbackUrl-related errors.

Validation and detection

  • Check package manifests and lockfiles for affected next-auth versions.
  • Identify applications exposing NextAuth API routes publicly or to untrusted users.
  • Confirm deployed builds run fixed next-auth versions after remediation.
  • Perform controlled negative testing for malformed callbackUrl handling without disrupting production.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-754: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31093 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
5Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H3.93.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2022-31093Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
nextauthjsnext-auth< 3.29.5, >= 4.0.0, < 4.5.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-754 · source CWE mapping

Improper Check for Unusual or Exceptional Conditions

Improper Check for Unusual or Exceptional Conditions represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.