CVE-2021-23566
MEDIUM 5.5CVSS 3.1Exposure of Sensitive Information to an Unauthorized Actor in nanoid
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.
- Published
- 14 Jan 2022
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-200CWE-704
- Also known as
- GHSA-qrpm-p2h7-hrv2
- Sources
- NVDJSONOSV GHSA-qrpm-p2h7-hrv2JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 2.1 | AV:L/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | nanoid_project | nanoidcpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:* |
>= 3.0.0, < 3.1.31 | 3.1.31 |
| OSV | npm | nanoid | >= 3.0.0, < 3.1.31 | 3.1.31 |
References
- https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444 · Exploit, Third Party Advisory, WEB
- https://github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575 · Patch, Third Party Advisory, WEB
- https://github.com/ai/nanoid/pull/328 · Exploit, Issue Tracking, Patch, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550 · Exploit, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JS-NANOID-2332193 · Exploit, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2024/12/msg00025.html · WEB
- https://lists.debian.org/debian-lts-announce/2025/01/msg00006.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-23566 · ADVISORY
- https://github.com/ai/nanoid · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 14 Jan 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 21 Jan 2022)