Quick answers
- Is CVE-2021-21310 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-21310 being exploited in the wild.
- How severe is CVE-2021-21310?
- Informational severity, published 11 February 2021.
- Which products and versions are affected?
- next-auth (npm) SEMVER:introduced=0,fixed=3.3.0.
- Is there a fix for CVE-2021-21310?
- Yes. next-auth (npm): upgrade to 3.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-21310 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2021-21310?
- Check whether you run next-auth (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- next-auth (npm): upgrade to 3.3.0 or later
npm install next-auth@3.3.0
Technical details
The vulnerability is an insecure authentication token verification flaw (CWE-290) in the Prisma database adapter of NextAuth.js versions prior to 3.3.0. The adapter was validating the verification token but failing to validate the identifier (email address) associated with that token. This allows an attacker with a valid token intended for one email address to authenticate as a different user by submitting the same token. The attack requires knowledge of a valid token and network access to the application; no additional authentication is required. The vulnerability is specific to implementations using both the Prisma adapter and the Email provider—users of the default TypeORM adapter or other authentication methods are unaffected. The issue was patched in version 3.3.0 (released 2021-02-09).
Affected products
- NextAuth.js next-auth < 3.3.0
Identifiers
- CVE-2021-21310
- GHSA-pg53-56cg-4m8q
Timeline
- 2021-02-08: disclosed: Vulnerability reported via responsible disclosure
- 2021-02-09: patched: Fix released in version 3.3.0
- 2021-02-10: advisory: CVE-2021-21310 assigned
- 2021-02-11: advisory: Public advisory published