CVE-2021-21310Nextauth.js Next-auth
Medium 5.9 No auth needed
Follow: this CVE · Nextauth.js · Nextauth.js Next-auth We alert you by email or Slack (account required).
- Priority
- 51
- CVSS 3.1
- 5.9
- EPSS
- 1.7% probability of exploitation in 30 days · percentile 77
- Auth required
- No
- Published
- Feb 11, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-290
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Next-auth.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | next-auth |
< 3.3.0 |
3.3.0 |
npm install next-auth@3.3.0 |
Per OSV / GitHub Advisories (GHSA-pg53-56cg-4m8q). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| nextauth.js | next-auth | < 3.3.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Third Party Advisory
- github.com Exploit Third Party Advisory
- www.npmjs.com Product Third Party Advisory