{"cve":"CVE-2022-35924","nvd":{"published":"2022-08-02T18:15:08.893","modified":"2026-06-17T04:52:31.980","status":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1},"cwes":["CWE-863","CWE-20"],"references":["https://en.wikipedia.org/wiki/Email_address#Local-part","https://github.com/nextauthjs/next-auth/commit/afb1fcdae3cc30445038ef588e491d139b916003","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/configuration/initialization#advanced-initialization"],"products":["nextauth.js:next-auth"],"source":"nvd","synced_at":"2026-10-19T21:34:18.502168378+00:00"},"epss":{"cve":"CVE-2022-35924","score":0.01471,"percentile":0.73777,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-xv97-c62v-4587","url":"https://osv.dev/vulnerability/GHSA-xv97-c62v-4587","summary":"NextAuth.js before 4.10.3 and 3.29.10 sending verification requests (magic link) to unwanted emails","modified":"2023-11-08T04:09:52.914769Z","packages":[{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":[">=4.0.0 <4.10.3"],"fixed":["4.10.3"]},{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":["<3.29.10"],"fixed":["3.29.10"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}