nanoid is a secure, URL-friendly, unique string ID generator for JavaScript. Prior to versions 3.3.12 and 5.1.11, the nanoid(size) function in index.js and index.cjs coerces the user-influenced size parameter to a signed 32-bit integer, allowing a value of 2147483648 to become -2...
Product
npm nanoid vulnerabilities
5 published CVES affecting npm nanoid, from public sources (CVE.org, NVD, CISA KEV, FIRST EPSS, OSV).
- Total
- 5
- Critical
- 0
- High
- 3
- Medium
- 2
- Low
- 0
- Unscored
- 0
- CISA KEV
- 0
Latest npm nanoid CVEs
Newest publication first
-
HighCVSS 7.4 EPSS 0.30%
-
HighCVSS 8.2 EPSS 0.33%
nanoid (Nano ID) before 3.3.16 and 5.1.16 contains an infinite loop in the customAlphabet and nanoid functions of its non-secure module (nanoid/non-secure). When these functions are given a negative size, the loop counter is decremented from a negative value and never reaches its...
-
CVE-2026-67213 nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
PublishedHighCVSS 8.2 EPSS 0.33%nanoid (Nano ID) before 5.1.6 contains an infinite loop in the customAlphabet and customRandom functions. When these functions are configured with a size of 0, the internal generation loop never satisfies its exit condition and spins indefinitely, hanging the calling thread. An a...
-
MediumCVSS 4.3 EPSS 0.66%
nanoid (aka Nano ID) before 5.0.9 mishandles non-integer values. 3.3.8 is also a fixed version.
-
CVE-2021-23566 Information Exposure
PublishedMediumCVSS 5.5 EPSS 0.47%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.
Sources: CVE.org, NVD, CISA KEV, FIRST EPSS, OSV and public exploit-reference metadata. Product matching comes from the published CVE records. A proof-of-concept means public code exists; it is not evidence of exploitation.