CVE-2021-23566
Information Exposure
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.0
Information Exposure
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.
- Record
CVE-2021-23566- 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 - Updated
- 2026-11-02
EUVDEUVD-2022-0677
4.0
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.
- Record
EUVD-2022-0677- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-qrpm-p2h7-hrv2
5.5
Exposure of Sensitive Information to an Unauthorized Actor in nanoid
The package nanoid from 3.0.0, before 3.1.31, are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.
- Record
GHSA-qrpm-p2h7-hrv2- 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 - Weakness
- CWE-200, CWE-704
- Updated
- 2026-11-02
NVD
4.0
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.
- Record
CVE-2021-23566- 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 - 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 - CVSS 2.0
- 2.1 Low
AV:L/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-704
- Updated
- 2026-11-02
OSV
5.5
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.
- Record
CVE-2021-23566- 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 - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-23566
5.5
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.
- Record
DEBIAN-CVE-2021-23566- 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 - Updated
- 2026-11-02
OSVGHSA-qrpm-p2h7-hrv2
5.5
Exposure of Sensitive Information to an Unauthorized Actor in nanoid
The package nanoid from 3.0.0, before 3.1.31, are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.
- Record
GHSA-qrpm-p2h7-hrv2- 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 - Weakness
- CWE-200, CWE-704
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-23566
4.0
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.
- Record
UBUNTU-CVE-2021-23566- 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 - 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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
nanoidnpm |
3.0.0 up to 3.1.31 | 3.1.31 |
node-mochaDebian:12 |
before 9.1.4+ds1+~cs28.2.8-1 | 9.1.4+ds1+~cs28.2.8-1 |
node-mochaDebian:13 |
before 9.1.4+ds1+~cs28.2.8-1 | 9.1.4+ds1+~cs28.2.8-1 |
node-mochaDebian:14 |
before 9.1.4+ds1+~cs28.2.8-1 | 9.1.4+ds1+~cs28.2.8-1 |
node-postcssDebian:12 |
before 8.4.5+~cs7.1.51-1 | 8.4.5+~cs7.1.51-1 |
node-postcssDebian:13 |
before 8.4.5+~cs7.1.51-1 | 8.4.5+~cs7.1.51-1 |
node-postcssDebian:14 |
before 8.4.5+~cs7.1.51-1 | 8.4.5+~cs7.1.51-1 |
node-postcssDebian:11 From an advisory covering 3 CVEs |
before 8.2.1+~cs5.3.23-8+deb11u1, plus listed versions 8.2.1+~cs5.3.23-8 |
8.2.1+~cs5.3.23-8+deb11u1 |
node-mochaDebian:11 From an advisory covering 2 CVEs |
before 8.2.1+ds1+~cs29.4.27-3+deb11u1, plus listed versions 8.2.1+ds1+~cs29.4.27-3 |
8.2.1+ds1+~cs29.4.27-3+deb11u1 |
node-mochaUbuntu:16.04:LTS |
All versions, plus listed versions 1.20.1-11.20.1-2 |
None known |
Show 13 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-mochaUbuntu:18.04:LTS |
All versions, plus listed versions 1.20.1-7 |
None known |
node-mochaUbuntu:20.04:LTS |
All versions, plus listed versions 4.1.0+ds3-57.0.1+ds1-2 |
None known |
node-postcssUbuntu:20.04:LTS |
All versions, plus listed versions 6.0.23-16.0.23-3 |
None known |
node-mochaUbuntu:22.04:LTS |
All versions, plus listed versions 8.2.1+ds1+~cs29.4.27-39.1.3+ds1+~cs31.2.38-19.2.0+ds1+~cs28.3.8-19.2.1+ds1+~cs28.3.8-1 |
None known |
node-postcssUbuntu:22.04:LTS |
All versions, plus listed versions 8.2.1+~cs5.3.23-88.4.5+~cs7.1.51-28.4.6+~cs7.3.21-1 |
None known |
node-mochaUbuntu:24.04:LTS |
All versions, plus listed versions 10.2.0+ds1+~cs29.5.1-110.4.0+ds1+~cs33.1.8-1 |
None known |
node-postcssUbuntu:24.04:LTS |
All versions, plus listed versions 8.4.20+~cs8.0.23-18.4.31+~cs8.0.26-1 |
None known |
node-mochaUbuntu:25.10 |
All versions, plus listed versions 10.7.2+ds1+~cs33.1.11-2 |
None known |
node-postcssUbuntu:25.10 |
All versions, plus listed versions 8.4.49+~cs9.2.32-18.5.6+~cs9.3.28-1 |
None known |
node-mochaUbuntu:26.10 |
All versions, plus listed versions 11.7.5+ds1+~cs36.3.14-211.7.7+ds1+~cs36.3.16-111.8.0+ds1+~cs36.4.12-111.8.0+ds1+~cs36.4.12-2 |
None known |
node-postcssUbuntu:26.10 |
All versions, plus listed versions 8.5.8+~cs9.3.30-18.5.15+~cs9.3.34-18.5.15+~cs9.3.38-18.5.15+~cs9.3.39-1build18.5.25+~cs10.2.23-18.5.26+~cs10.2.24-1 |
None known |
node-mochaUbuntu:26.04:LTS |
All versions, plus listed versions 10.7.2+ds1+~cs33.1.11-211.7.2+ds1+~cs36.3.14-2build111.7.5+ds1+~cs36.3.14-2 |
None known |
node-postcssUbuntu:26.04:LTS |
All versions, plus listed versions 8.5.6+~cs9.3.28-18.5.8+~cs9.3.30-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-23566 is a medium vulnerability (CVSS 4.0) in Nanoid Project Nanoid, published January 14, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.47%, the 41st percentile. Fixed in nanoid 3.1.31.