CVE-2022-39263 Details
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.
A vulnerability exists in the Upstash Redis adapter for NextAuth.js, affecting versions prior to 3.0.2. The issue arises because the adapter's email verification process only checks the identifier (email) and not the verification token. This flaw allows an attacker who knows the victim's email and the token's expiration duration to impersonate the victim. The vulnerability is patched in version 3.0.2, and a workaround is available by using Advanced Initialization to compare the token and email before proceeding.
Users can upgrade to version 3.0.2 or later. For those using npm, the command is 'npm i @next-auth/upstash-redis-adapter@latest'. For yarn, use 'yarn add @next-auth/upstash-redis-adapter@latest'. If using pnpm, the command is 'pnpm add @next-auth/upstash-redis-adapter@latest'.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 23, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9 | CVE | Patch |
| https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9 | CVE | MitigationPatchThird Party Advisory |
| https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9 | [email protected] | Patch |
| https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9 | [email protected] | MitigationPatchThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-287 | Improper Authentication | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| nextauth.js next-auth | < 3.0.2 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Mar 3, 2023 | Reanalysis | [email protected] |
| Sep 30, 2022 | Initial Analysis | [email protected] |