# CVE-2021-23566: Information Exposure

- Severity: Medium 4.0 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 4 links below, marked "exploit"
- Published: 2022-01-14T20:05:21.597Z
- Modified: 2026-06-17T03:38:49.813Z
- Also known as: GHSA-qrpm-p2h7-hrv2
- Weaknesses: CWE-200, CWE-704
- Assigned by: snyk

## Description

The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.

(As written by CVE List.)

## Affected

- nanoid: from unspecified before 3.1.31
- nanoid (npm): from 3.0.0 before 3.1.31
- nanoid_project nanoid: from 3.0.0 before 3.1.31

## Every score

- snyk: CVSS:3.1 4.0 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 2.1 Low `AV:L/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-NANOID-2332193> (exploit, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550> (exploit, third-party-advisory, web)
- <https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444> (exploit, third-party-advisory, web)
- <https://github.com/ai/nanoid/pull/328> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575> (patch, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00006.html> (web)
- <https://lists.debian.org/debian-lts-announce/2024/12/msg00025.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23566> (advisory)
- <https://github.com/ai/nanoid> (package)

## Sources

- CVE List: [CVE-2021-23566](https://www.cve.org/CVERecord?id=CVE-2021-23566), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-qrpm-p2h7-hrv2](https://github.com/advisories/GHSA-qrpm-p2h7-hrv2), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2021-23566](https://nvd.nist.gov/vuln/detail/CVE-2021-23566), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23566 · Whole record: https://cve.day/CVE-2021-23566.json · Rebuilt by cve.day 2026-11-25T22:58:06.537Z
