Auth bypass in Nextauth.js Next-Auth
CVE-2022-39263
`@next-auth/upstash-redis-adapter` is the Upstash Redis adapter for NextAuth.js, which provides authentication for Next.js. Applications that use `next-auth` Email Provider and `@next-auth/upstash-redis-adapter` before v3.0.2 are affected by this vulnerability. The Upstash Redis adapter implementation did not check for both the identifier (email) and the token, but only checking for the identifier when verifying the token in the email callback flow. An attacker who knows about the victim's email could easily sign in as the victim, given the attacker also knows about the verification token's expired duration. The vulnerability is patched in v3.0.2. A workaround is available. Using Advanced Initialization, developers can check the requests and compare the query's token and identifier before proceeding.
Vulnerability class: Broken Authentication
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.8 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N.
EPSS exploit prediction
EPSS: 0.007 (51.4th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 51st percentile — 51.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.006 · newest: 0.007 · change: +0.001
Affected products
- Nextauth.js Next-Auth
- Nextauthjs Next-Auth — versions < 3.0.2
Weakness classification (CWE)
References
- github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9 (Patch, Third Party Advisory, Mitigation)
- github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9 (Patch)
Frequently asked questions
- What is CVE-2022-39263?
- CVE-2022-39263 is a medium-severity vulnerability in Nextauth.js Next-Auth, classified under Improper Authentication. CVSS score: 6.8/10. Published 2022-09-28.
- How severe is CVE-2022-39263?
- Medium severity. CVSS v3 base score is 6.8 out of 10.