CVE-2021-21310
Token verification bug in next-auth
Also known as GHSA-pg53-56cg-4m8q
Mitigation
- Upgrade next-auth to 3.3.0 or later.
Who should check
- Projects that depend on npm package next-auth (< 3.3.0)
- Anyone running nextauthjs next-auth < 3.3.0
Vulnerability facts
- Affected
- next-auth < 3.3.0
- Fixed in
- 3.3.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 1.69% chance of exploitation in 30 days (percentile 77, 2026-11-26)
- CWE
- CWE-290
- Modified
Description
NextAuth.js (next-auth) is am open source authentication solution for Next.js applications. In next-auth before version 3.3.0 there is a token verification vulnerability. Implementations using the Prisma database adapter in conjunction with the Email provider are impacted. Implementations using the Email provider with the default database adapter are not impacted. Implementations using the Prisma database adapter but not using the Email provider are not impacted. The Prisma database adapter was checking the verification token, but was not verifying the email address associated with that token. This made it possible to use a valid token to sign in as another user when using the Prima adapter in conjunction with the Email provider. This issue is specific to the community supported Prisma adapter. This issue is fixed in version 3.3.0.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm next-auth | < 3.3.0 | 3.3.0 | osv |
| nextauthjs next-auth | < 3.3.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-21310. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-21310.md Affected: next-auth < 3.3.0 Fixed in: 3.3.0 Steps: 1. Search this machine and project for next-auth (npm), nextauthjs next-auth: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2021-21310 being exploited?
There is no confirmed exploitation: CVE-2021-21310 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.69% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-21310?
Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2021-21310?
next-auth < 3.3.0.
Is there a fix for CVE-2021-21310?
Yes. Fixed in 3.3.0. Upgrade next-auth to 3.3.0 or later.
How do I check if I'm affected by CVE-2021-21310?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.