CVE-2021-21310 json
Token verification bug in next-auth
published 2021-02-11 5 y ago modified 2026-07-08 4 mo ago also GHSA-pg53-56cg-4m8q , EUVD-2021-0562
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.7%
- EPSS 1.7% chance of exploitation in 30 days, percentile 77%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm next-auth 3.3.0
- nextauth.js next-auth 3.3.0
Exploit prediction
1.69% chance of exploitation in the next 30 days, higher than 77% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pg53-56cg-4m8q referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N |
| NVD | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | next-auth | <3.3.0 |
3.3.0 |
Affected products
- nextauthjs next-auth
Classification
- Weakness
-
- CWE-290 Authentication Bypass by Spoofing
References
-
github.com
/nextauthjs/next-auth/security/advisories/GHSA-pg53-56cg-4m8q
web, exploit, third-party-advisory
-
npmjs.com
/package/next-auth
web, product, third-party-advisory
-
github.com
/nextauthjs/next-auth/releases/tag/v3.3.0
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21310
advisory
Sources
- CVE List CVE-2021-21310
- GitHub Advisory GHSA-pg53-56cg-4m8q
- NVD CVE-2021-21310
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.