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.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)0.3%top 73.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12node-mocha9.1.4+ds1+~cs28.2.8-1DEBIAN-CVE-2026-67214
Debian:13node-mocha9.1.4+ds1+~cs28.2.8-1DEBIAN-CVE-2026-67214
Debian:14node-mocha9.1.4+ds1+~cs28.2.8-1DEBIAN-CVE-2026-67214
Debian:12node-postcssno fix listedDEBIAN-CVE-2026-67214
Debian:13node-postcssno fix listedDEBIAN-CVE-2026-67214
Debian:14node-postcss8.5.15+~cs9.3.39-1DEBIAN-CVE-2026-67214
Ubuntu:22.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-67214
Ubuntu:24.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-67214
Ubuntu:26.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-67214
npmnanoid5.1.16GHSA-28wg-ghj8-5hjv
npmnanoid3.3.16GHSA-28wg-ghj8-5hjv

Affected products (as reported)

VendorProductVersions
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