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.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)1.7%top 22.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npmnext-auth3.3.0GHSA-pg53-56cg-4m8q

Affected products (as reported)

VendorProductVersions
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