CVE-2026-67214 nanoid Infinite Loop via Negative Size in non-secure module
An attacker can cause a denial of service by passing a negative size to nanoid's non-secure module, triggering an infinite loop.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-67214?
CVE-2026-67214 is a high-severity denial of service vulnerability in nanoid_project nanoid, published on 29 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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 termination condition, spinning indefinitely and hanging the calling thread. An application that passes an unvalidated, attacker-controlled negative size to these functions is exposed to a denial-of-service condition.
Weakness: CWE-835
Which versions are affected by CVE-2026-67214?
4 open source packages ship an affected version, including nanoid. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
nanoid npm | All versions | 3.3.16 |
nanoid npm | All versions | 3.3.16 |
nanoid npm | From 4.0.0 | 5.1.16 |
nanoid npm | From 4.0.0 | 5.1.16 |
Linux distribution packages (1)
jaeger Red Hat:hummingbird:1 | All versions | 0:2.20.0-0.7.hum1 |
Products include Nanoid Project Nanoid.
How do I fix CVE-2026-67214?
Upgrade nanoid to a fixed version for your release line: 3.3.16 or 5.1.16.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-67214 being exploited?
There is no known exploitation of CVE-2026-67214 in the wild and no public exploit code.
Other vulnerabilities in nanoid_project nanoid
Sources
Also known as CLEANSTART-2026-DG52201, CLEANSTART-2026-EO79562, CLEANSTART-2026-WC95670, CLSA-2026-1790622758, CLSA-2026-1790622992, CLSA-2026-1790673732 and 29 more.