CVE-2022-35924
Last modified
CVE-2022-35924 is a critical-severity vulnerability rated 9.1/10 on the CVSS scale. 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. EPSS estimates a 1.10% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Nextauth.Js | Next-Auth | < 3.29.10 |
| Nextauth.Js | Next-Auth | >= 4.0.0, < 4.10.3 |
References
- https://en.wikipedia.org/wiki/Email_address#Local-partThird Party Advisory
- https://github.com/nextauthjs/next-auth/commit/afb1fcdae3cc30445038ef588e491d139b916003Patch, Third Party Advisory
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-xv97-c62v-4587Mitigation, Third Party Advisory
- https://next-auth.js.org/providers/emailVendor Advisory
- https://nodemailer.com/message/addressesThird Party Advisory
- https://en.wikipedia.org/wiki/Email_address#Local-partThird Party Advisory
- https://github.com/nextauthjs/next-auth/commit/afb1fcdae3cc30445038ef588e491d139b916003Patch, Third Party Advisory
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-xv97-c62v-4587Mitigation, Third Party Advisory
- https://next-auth.js.org/providers/emailVendor Advisory
- https://nodemailer.com/message/addressesThird Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2022-35924?
How severe is CVE-2022-35924?
How do I fix CVE-2022-35924?
How Strix Helps
- Uncovering a hidden BOLA in Appsmith's snapshot logicStrix autonomously discovered a BOLA/IDOR vulnerability in Appsmith's snapshot deletion path.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2022
- CVE-2022-35919MinIO is a High Performance Object Storage released under GN…2.7
- CVE-2022-3592A symlink following vulnerability was found in Samba, where …6.5
- CVE-2022-35920Sanic is an opensource python web server/framework. Affected…7.5
- CVE-2022-35921fof/byobu is a private discussions extension for Flarum foru…4.3
- CVE-2022-35922Rust-WebSocket is a WebSocket (RFC6455) library written in R…7.5
- CVE-2022-35923v8n is a javascript validation library. Versions of v8n prio…7.5
- CVE-2022-35925BookWyrm is a social network for tracking reading. Versions …9.8
- CVE-2022-35926Contiki-NG is an open-source, cross-platform operating syste…7.5
- CVE-2022-35927Contiki-NG is an open-source, cross-platform operating syste…9.8
- CVE-2022-35928AES Crypt is a file encryption software for multiple platfor…5.5
- CVE-2022-35929cosign is a container signing and verification utility. In v…9.8
- CVE-2022-3593Rejected reason: DO NOT USE THIS CANDIDATE NUMBER. ConsultID…
Are you affected by CVE-2022-35924?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
