Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @next-auth/upstash-redis-adapter
  4. ›
  5. CVE-2022-39263

CVE-2022-39263: Improper Authentication

September 30, 2022

@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 does 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.

References

  • github.com/advisories/GHSA-4rxr-27mm-mxq9
  • github.com/nextauthjs/next-auth/commit/d16e04848ee703cf797724194d4ad2907fe125a9
  • github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9
  • nvd.nist.gov/vuln/detail/CVE-2022-39263

Code Behaviors & Features

Detect and mitigate CVE-2022-39263 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.0.2

Fixed versions

  • 3.0.2

Solution

Upgrade to version 3.0.2 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-287: Improper Authentication

Source file

npm/@next-auth/upstash-redis-adapter/CVE-2022-39263.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:38 +0000.