CVE-2021-23566: Information Exposure
Vulnerability summary
CVE-2021-23566 is a medium (CVSS 5.5) Incorrect Type Conversion or Cast vulnerability in nanoid_project nanoid. EPSS estimates a 0.44% chance of exploitation in the next 30 days, higher than 38.2% of scored vulnerabilities. 4 public exploits are recorded.
Not severe (CVSS 4, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2Timeline
- 14-01-2022PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 5 sources · 2 versions- CVE.orgCNA4.0MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:PDiffers
- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- OSV · NpmEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
0.44%
Chance of exploitation in the next 30 days
Percentile
38%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.44% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
4 foundBc6D1Eb9A3477D15D2772E876169A444
Maturity: poc
Nanoid
Maturity: poc
Exploit Reference (snyk.io)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian2 products
- node-mocha< 9.1.4+ds1+~cs28.2.8-1
- node-postcss< 8.4.5+~cs7.1.51-1
Ubuntu2 products
- node-mochaAll versions (No fix recorded)
- node-postcssAll versions (No fix recorded)
Nanoid_project1 product
- nanoid≥ 3.0.0, < 3.1.31
Npm1 product
- nanoid≥ 3.0.0, < 3.1.31
4 vendors · 6 products
References
12 links- gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444X Refsource MISCREPORTWEBExploitThird Party Advisory
- github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575X Refsource MISCREPORTWEBPatchThird Party Advisory
- github.com/ai/nanoid/pull/328X Refsource MISCREPORTWEBExploitIssue TrackingPatchThird Party Advisory
Show all 12 references
- github.com/ai/nanoidPACKAGE