Quick answers
- Is CVE-2021-23566 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-23566 being exploited in the wild.
- How severe is CVE-2021-23566?
- Low severity, with a CVSS score of 3.1, published 21 January 2022.
- Which products and versions are affected?
- nanoid (npm) SEMVER:introduced=3.0.0,fixed=3.1.31.
- Is there a fix for CVE-2021-23566?
- Yes. nanoid (npm): upgrade to 3.1.31 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-23566 attacked?
- It is attacked with local access.
- Am I affected by CVE-2021-23566?
- Check whether you run nanoid (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
- nanoid (npm): upgrade to 3.1.31 or later
npm install nanoid@3.1.31
Technical details
The vulnerability is an information exposure flaw (CWE-200, CWE-704) in nanoid's valueOf() function implementation. Versions 3.0.0 through 3.1.30 allow an attacker to reproduce the last generated ID, breaking the confidentiality of ID generation. This is a local privilege vulnerability requiring local access (AV:L) and low privileges (PR:L), with no user interaction needed. An attacker can deterministically recreate previously issued IDs, which may compromise applications using nanoid for security tokens, session identifiers, or other confidential purposes. The vulnerability was fixed in version 3.1.31 via commit 2b7bd9332bc49b6330c7ddb08e5c661833db2575.
Affected products
- ai nanoid 3.0.0 to 3.1.30
Identifiers
- CVE-2021-23566
- GHSA-qrpm-p2h7-hrv2
Timeline
- 2022-01-21: disclosed: Advisory published via GitHub Security Advisory GHSA-qrpm-p2h7-hrv2
- 2022-01-11: patched: Fix merged in pull request #328, available in version 3.1.31