CVE-2022-39263: NextAuth Upstash Redis Adapter - Authentication Bypass
- Cve: CVE-2022-39263
- Name: NextAuth Upstash Redis Adapter - Authentication Bypass
- Description: `@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.
- Impact: Attackers can impersonate victims and gain unauthorized access by bypassing token verification in the email authentication flow.
- Remediation: Update to version 3.0.2 or later. As a workaround, implement request checks to compare token and identifier before proceeding.
- Vulnerability type: broken_authentication
- Vulnerability impact: privilege_escalation
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00737
- Epss percentile: 0.55445
- Assignee: [email protected]
- Published at: 2022-09-28T21:15:14Z
- Age in days: 1518
- Modified at: 2026-06-17T04:58:01Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-39263
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-287 | Improper Authentication |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9 | nvd | Patch |
| https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9 | nvd | Mitigation, Patch, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| nextauth.js:next-auth | < 3.0.2 | no | nvd | /v1/products/nextauth.js/next-auth |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| nextauthjs/next-auth | commit, fix, package, security_advisory | yes | /v1/repositories/nextauthjs/next-auth |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts