Live threats

All CVEs / Nextauth.js

CVE-2022-31093Nextauth.js Next-auth

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
1.9%
probability of exploitation in 30 days · percentile 80
Auth required
No
Published
Jun 27, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-754
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Next-auth.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm next-auth < 3.29.5 3.29.5 npm install next-auth@3.29.5
npm next-auth ≥ 4.0.0 < 4.5.0 4.5.0 npm install next-auth@4.5.0

Per OSV / GitHub Advisories (GHSA-g5fm-jp9v-2432). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
nextauth.jsnext-auth≥ 3.0.0 < 3.29.5
nextauth.jsnext-auth≥ 4.0.0 < 4.5.0

Official sources

References

Links published by the sources. Open them with care.