{"id":"CVE-2021-21310","published":"2021-02-11T21:40:16Z","modified":"2024-08-03T18:09:15Z","title":"Token verification bug in next-auth","vendor":"nextauthjs","product":"next-auth","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01688,"percentile":0.77608,"provenance":"source"},"cwes":[{"id":"CWE-290","name":"Authentication Bypass by Spoofing"}],"references":[{"url":"https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pg53-56cg-4m8q","tags":["x_refsource_CONFIRM"]},{"url":"https://www.npmjs.com/package/next-auth","tags":["x_refsource_MISC"]},{"url":"https://github.com/nextauthjs/next-auth/releases/tag/v3.3.0","tags":["x_refsource_MISC"]}],"priority":{"score":19.8,"factors":[{"name":"EPSS percentile","points":15.52},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"nextauthjs","affectedVersions":[{"vendor":"nextauthjs","product":"next-auth","versions":["< 3.3.0"]}],"affected":[{"ecosystem":"npm","package":"next-auth","vulnerableRanges":["<3.3.0"],"patched":["3.3.0"],"from":["GHSA-pg53-56cg-4m8q"],"provenance":"source"}],"summary":{"text":"The token verification flaw lives in next-auth, the open source authentication library for Next.js, specifically in the community-supported Prisma database adapter when it is used together with the Email provider. An attacker holding a valid verification token can sign in as another user, because the adapter checks the token but does not verify that it matches the email address it was issued for; this requires that the Prisma adapter and Email provider be combined and that the attacker can obtain or use a valid token, with the victim's interaction (UI:R) needed as the attack vector indicates.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:17:06Z"},"euvd":{"id":"EUVD-2021-0562","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-21310","published":"2021-02-11","fixed":"3.3.0","kev":false},{"cve":"CVE-2022-24858","published":"2022-04-19","fixed":"4.3.2","kev":false,"link":{"from":"CVE-2021-21310","to":"CVE-2022-24858","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:next-auth","fromFixed":"3.3.0","toFixed":"3.29.2","daysApart":432}]}},{"cve":"CVE-2022-29214","published":"2022-05-20","fixed":"4.3.3","kev":false},{"cve":"CVE-2022-31093","published":"2022-06-27","fixed":"4.5.0","kev":false}],"package":"npm:next-auth"}}