8.2high
nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
- Severity
- 8.2high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.33% (higher than 28% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-2v37-7h3g-55p8
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nanoid_project nanoid | from 3.0.0 before 3.3.17, from 5.0.0 before 5.1.6 | CVE List, NVD |
| nanoid (npm) | before 3.3.18, from 4.0.0 before 5.1.6 | GitHub Advisory Database |
All scores
| VulnCheck | 8.2high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 5.9high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
nanoid (Nano ID) antes de 5.1.6 contiene un bucle infinito en las funciones customAlphabet y customRandom. Cuando estas funciones se configuran con un tamaño de 0, el bucle de generación interno nunca satisface su condición de salida y gira indefinidamente, colgando el hilo de llamada. Una aplicación que pasa un tamaño de 0 no validado y controlado por el atacante a estas funciones está expuesta a una condición de denegación de servicio.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-67213 changed 2026-10-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2v37-7h3g-55p8 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-67213 changed 2026-10-23 | Public domain |