# CVE-2022-39263: NextAuth Upstash Redis Adapter auth bypass in email verification

Source: https://junglewise.ai/threats/cve-2022-39263-nextauth-upstash-redis-adapter-auth-bypass-in-email-verification  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-09-30. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2022-39263 · Severity: low · CVSS 3.1 · Published 2022-09-30

NextAuth's Upstash Redis Adapter is used to manage user sessions and email-based authentication in web applications. The adapter failed to properly validate email verification tokens, allowing an attacker who knows a victim's email address to sign in as that user if they can guess or obtain the verification token. This bypasses the intended email-based authentication flow and compromises account security.

Vendors: [NextAuth.js](https://junglewise.ai/threats/vendors/nextauth-js), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2022-39263 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-39263 being exploited in the wild.

**How severe is CVE-2022-39263?** Low severity, with a CVSS score of 3.1, published 30 September 2022.

**Which products and versions are affected?** @next-auth/upstash-redis-adapter (npm) SEMVER:introduced=0,fixed=3.0.2.

**Is there a fix for CVE-2022-39263?** Yes. @next-auth/upstash-redis-adapter (npm): upgrade to 3.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2022-39263 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2022-39263?** Check whether you run NextAuth.js Upstash Redis Adapter or @next-auth/upstash-redis-adapter (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @next-auth/upstash-redis-adapter (npm): upgrade to 3.0.2 or later

  ```sh
  npm install @next-auth/upstash-redis-adapter@3.0.2
  ```


## Technical details

The vulnerability is an authentication bypass (CWE-287/CWE-285) in the Upstash Redis Adapter's email verification flow. The vulnerable code checked only the email identifier against stored verification tokens but did not validate that the provided token matched the stored token value. An unauthenticated attacker with network access to the application can exploit this by providing a known email address and a guessed or obtained verification token. Precondition: the application must use the Email Provider with the Upstash Redis Adapter for authentication. Successful exploitation allows account takeover with high impact on confidentiality and integrity. The vulnerability was patched in version 3.0.2 with a commit that adds proper token validation alongside email identifier checking.

## Affected products

- NextAuth @next-auth/upstash-redis-adapter before 3.0.2

## Identifiers

- CVE-2022-39263
- GHSA-4rxr-27mm-mxq9

## Timeline

- 2022-09-28: disclosed: CVE published
- 2022-09-30: disclosed: GHSA advisory published
- 2022-09-28: patched: Fix committed (v3.0.2)

## References

- [https://github.com/nextauthjs/next-auth/security/advisories/GHSA-4rxr-27mm-mxq9](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/commit/d16e04848ee703cf797724194d4ad2907fe125a9)
- [https://github.com/nextauthjs/next-auth](https://github.com/nextauthjs/next-auth)
