DoS via Infinite Loop in nanoid <=5.1.6 CustomAlphabet
CVE-2026-67213 Published on July 29, 2026
nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
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.
Vulnerability Analysis
CVE-2026-67213 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity, and a high impact on availability.
Weakness Type
What is an Infinite Loop Vulnerability?
The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
CVE-2026-67213 has been classified to as an Infinite Loop vulnerability or weakness.
Products Associated with CVE-2026-67213
Want to know whenever a new CVE is published for Nanoidproject Nanoid? stack.watch will email you.
Affected Versions
nanoid_project nanoid:- Before 5.1.6 is affected.
- Version 5.1.6 is unaffected.