CVE-2022-39263
What it is
`@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.
At a glance
- Exploitability
- Can be exploited over the network without logging in, but needs a user to act. High risk of data exposure, data tampering.
- Exploit odds
- 0.7% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.7% in the next 30 days (EPSS).
- Severity: 6.8 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.7% · EPSS, next 30 days
- Weakness
- CWE-287 · Improper authentication
- Record status
- Modified
Affected
- nextauth.js next-auth < 3.0.2
Attack profile CVSS 3.1 · 6.8
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-39263.md and follow it. Check whether this project is affected by CVE-2022-39263. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9
- https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9
References
- https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9
- https://github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9