Vulnerability · Published Jul 29, 2026 · Assigned by VulnCheck
CVE-2026-67214nanoid Infinite Loop via Negative Size in non-secure module
Medium 5.9
In plain English
A medium-severity infinite loop in nanoid from nanoid_project. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 26% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-mocha | 9.1.4+ds1+~cs28.2.8-1 | DEBIAN-CVE-2026-67214 |
| Debian:13 | node-mocha | 9.1.4+ds1+~cs28.2.8-1 | DEBIAN-CVE-2026-67214 |
| Debian:14 | node-mocha | 9.1.4+ds1+~cs28.2.8-1 | DEBIAN-CVE-2026-67214 |
| Debian:12 | node-postcss | no fix listed | DEBIAN-CVE-2026-67214 |
| Debian:13 | node-postcss | no fix listed | DEBIAN-CVE-2026-67214 |
| Debian:14 | node-postcss | 8.5.15+~cs9.3.39-1 | DEBIAN-CVE-2026-67214 |
| Ubuntu:22.04:LTS | node-postcss | no fix listed | UBUNTU-CVE-2026-67214 |
| Ubuntu:24.04:LTS | node-postcss | no fix listed | UBUNTU-CVE-2026-67214 |
| Ubuntu:26.04:LTS | node-postcss | no fix listed | UBUNTU-CVE-2026-67214 |
| npm | nanoid | 5.1.16 | GHSA-28wg-ghj8-5hjv |
| npm | nanoid | 3.3.16 | GHSA-28wg-ghj8-5hjv |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| nanoid_project | nanoid | 4.0.0 – before 5.1.160 – before 3.3.16 |
Weakness: CWE-835 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- v5.1.16 Release Notes release-notes
- v3.3.16 Release Notes release-notes
- Fix Commit patch
- VulnCheck Advisory third-party-advisory