CVE-2026-67213
MEDIUMnanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
Title source: cnaDescription
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 application that passes an unvalidated, attacker-controlled size of 0 to these functions is exposed to a denial-of-service condition.
References (3)
Core 3
Core References
Release Notes release-notes
nanoid 5.1.6 release notes
https://github.com/ai/nanoid/releases/tag/5.1.6
Patch patch
Fix commit (reject size of 0)
https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7
Third Party Advisory third-party-advisory
VulnCheck Advisory: nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom
Scores
CVSS v3
5.9
EPSS
0.0032
EPSS Percentile
24.4%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
CISA SSVC
Vulnrichment
Exploitation
none
Automatable
no
Technical Impact
partial
Details
CWE
CWE-835
Status
published
Products (2)
nanoid_project/nanoid
< 5.1.6
nanoid_project/nanoid
5.1.6
Published
Jul 29, 2026
Tracked Since
Jul 29, 2026