CVE-2021-23566Nanoid Project Nanoid
Medium 5.5
Follow: this CVE · Nanoid Project · Nanoid Project Nanoid We alert you by email or Slack (account required).
- Priority
- 33
- CVSS 3.1
- 5.5
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 43
- Auth required
- Yes
- Published
- Jan 14, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-704
- Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Nanoid.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | nanoid |
≥ 3.0.0 < 3.1.31 |
3.1.31 |
npm install nanoid@3.1.31 |
Per OSV / GitHub Advisories (GHSA-qrpm-p2h7-hrv2). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| nanoid_project | nanoid | ≥ 3.0.0 < 3.1.31 |
Official sources
References
Links published by the sources. Open them with care.
- gist.github.com Exploit Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Exploit Issue Tracking Patch
- snyk.io Exploit Third Party Advisory
- snyk.io Exploit Third Party Advisory
- lists.debian.org
- lists.debian.org