Verification requests (magic link) sent to unwanted emails
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-863.
Summary
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.: `[email protected],[email protected]`) 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 `[email protected],[email protected]`. 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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nextauthjs | next-auth | 4.0.0 to before 4.10.3; before 3.29.10 | 4.10.3, 3.29.10 | Patch available | CNA |
| — | next-auth (npm) | 4.0.0 to before 4.10.3 | 4.10.3 | Patch available | GHSA-xv97-c62v-4587 |
| — | next-auth (npm) | before 3.29.10 | 3.29.10 | Patch available | GHSA-xv97-c62v-4587 |
- next-auth Vendornextauthjs Affected 4.0.0 to before 4.10.3; before 3.29.10 Fixed in 4.10.3, 3.29.10 Patch available CNA
- next-auth (npm) Vendor— Affected 4.0.0 to before 4.10.3 Fixed in 4.10.3 Patch available GHSA-xv97-c62v-4587
- next-auth (npm) Vendor— Affected before 3.29.10 Fixed in 3.29.10 Patch available GHSA-xv97-c62v-4587
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* | before 3.29.10; 4.0.0 to before 4.10.3 | Vulnerable | nextauthjs |
- cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:* Versions before 3.29.10; 4.0.0 to before 4.10.3 Vulnerable ·nextauthjs
Remediation
- Fix · CNA next-auth (nextauthjs) Fixed in 4.10.3, 3.29.10
- Fix · GHSA-xv97-c62v-4587 next-auth (npm) Fixed in 4.10.3 Advisory →
- Fix · GHSA-xv97-c62v-4587 next-auth (npm) Fixed in 3.29.10 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-35924
- 2026-10-03 Alias added: GHSA-xv97-c62v-4587
References
Advisory 8
- https://next-auth.js.org/configuration/initialization#advanced-initialization
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-xv97-c62v-4587
- https://en.wikipedia.org/wiki/Email_address#Local-part
- 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://nodemailer.com/message/addresses
- https://nvd.nist.gov/vuln/detail/CVE-2022-35924
More nextauthjs Next-auth vulnerabilities
- TI-2022-13171 Improper handling of email input in next-auth CVSS 3.1HIGH 7.1
- TI-2022-13137 Improper Handling of `callbackUrl` parameter in next-auth CVSS 3.1HIGH 7.5
- TI-2023-12218 Missing proper state, nonce and PKCE checks for OAuth authentication in next-auth CVSS 3.1HIGH 8.8
- TI-2022-18639 NextAuth.js Upstash Adapter missing token verification CVSS 3.1HIGH 8.1
- TI-2023-26172 next-auth vulnerable to possible user mocking that bypasses basic authentication CVSS 3.1MEDIUM 5.3
- TI-2021-04410 Token verification bug in next-auth CVSS 3.1MEDIUM 6.1
Sources
- CVE-2022-35924 · CVE Program
- CVE-2022-35924 · NVD
- FIRST EPSS
- GHSA-xv97-c62v-4587 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences