Vulnerability · Published Feb 11, 2021 · Assigned by GitHub_M
CVE-2021-21310Token verification bug in next-auth
Medium 6.1
In plain English
A medium-severity authentication bypass by spoofing in next-auth from nextauthjs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.7% (higher than 77% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | next-auth | 3.3.0 | GHSA-pg53-56cg-4m8q |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| nextauthjs | next-auth | < 3.3.0 |
Weakness: CWE-290 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N
References
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pg53-56cg-4m8q x_refsource_CONFIRM
- https://www.npmjs.com/package/next-auth x_refsource_MISC
- https://github.com/nextauthjs/next-auth/releases/tag/v3.3.0 x_refsource_MISC