Improper resource allocation In nanoid
Description
nanoid: custom generators can loop indefinitely when size is zero 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.
Mitigation
Update Impact
Minimal update. May introduce new vulnerabilities or breaking changes.
Ecosystem | Component | Affected version | Patched versions |
|---|---|---|---|
debian 14 | 8.5.8+~cs9.3.30-1 | ||
debian 13 | 9.1.4+ds1+~cs28.2.8-1 | ||
debian 13 | - | ||
npm | 3.3.18, 5.1.6 | ||
debian 12 | 9.1.4+ds1+~cs28.2.8-1 | ||
debian 14 | 9.1.4+ds1+~cs28.2.8-1 | ||
debian 12 | - |
Aliases
1. 2. 3. 4. 5. 6.
References
1. 2. 3. 4. 5. 6. 7.