CVE-2022-35924
Verification requests (magic link) sent to unwanted emails
Also known as GHSA-xv97-c62v-4587
Mitigation
- Upgrade next-auth to one of 4.10.3, 3.29.10 (or later in the same release line).
Who should check
- Projects that depend on npm package next-auth (>= 4.0.0, < 4.10.3)
- Anyone running nextauthjs next-auth >= 4.0.0, < 4.10.3; < 3.29.10
Vulnerability facts
- Affected
- next-auth >= 4.0.0, < 4.10.3
- Fixed in
- 4.10.3, 3.29.10
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 1.56% chance of exploitation in 30 days (percentile 76, 2026-11-26)
- CWE
- CWE-20
- Modified
Description
NextAuth.js is a complete open source authentication solution for Next.js applications. `next-auth` users who are using the `EmailProvider` either in versions before `4.10.3` or `3.29.10` are affected. If an attacker could forge a request that sent a comma-separated list of emails (eg.: `attacker@attacker.com,victim@victim.com`) to the sign-in endpoint, NextAuth.js would send emails to both the attacker and the victim's e-mail addresses. The attacker could then login as a newly created user with the email being `attacker@attacker.com,victim@victim.com`. This means that basic authorization like `email.endsWith("@victim.com")` in the `signIn` callback would fail to communicate a threat to the developer and would let the attacker bypass authorization, even with an `@attacker.com` address. This vulnerability has been patched in `v4.10.3` and `v3.29.10` by normalizing the email value that is sent to the sign-in endpoint before accessing it anywhere else. We also added a `normalizeIdentifier` callback on the `EmailProvider` configuration, where you can further tweak your requirements for what your system considers a valid e-mail address. (E.g.: strict RFC2821 compliance). Users are advised to upgrade. There are no known workarounds for this vulnerability. If for some reason you cannot upgrade, you can normalize the incoming request using Advanced Initialization.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm next-auth | >= 4.0.0, < 4.10.3 | 4.10.3, 3.29.10 | osv |
| nextauthjs next-auth | >= 4.0.0, < 4.10.3; < 3.29.10 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-35924. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-35924.md Affected: next-auth >= 4.0.0, < 4.10.3 Fixed in: 4.10.3, 3.29.10 Steps: 1. Search this machine and project for next-auth (npm), nextauthjs next-auth: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://next-auth.js.org/configuration/initialization#advanced-initialization
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-xv97-c62v-4587
- https://next-auth.js.org/configuration/callbacks#sign-in-callback
- https://next-auth.js.org/providers/email
- https://next-auth.js.org/providers/email#normalizing-the-e-mail-address
- https://nvd.nist.gov/vuln/detail/CVE-2022-35924
FAQ
Is CVE-2022-35924 being exploited?
There is no confirmed exploitation: CVE-2022-35924 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.56% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-35924?
Critical: CVSS 9.1 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2022-35924?
next-auth >= 4.0.0, < 4.10.3.
Is there a fix for CVE-2022-35924?
Yes. Fixed in 4.10.3, 3.29.10. Upgrade next-auth to one of 4.10.3, 3.29.10 (or later in the same release line).
How do I check if I'm affected by CVE-2022-35924?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.