CVE-2026-67213

NameCVE-2026-67213
Descriptionnanoid (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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-mocha (PTS)bullseye8.2.1+ds1+~cs29.4.27-3vulnerable
bullseye (security)8.2.1+ds1+~cs29.4.27-3+deb11u1vulnerable
bookworm10.1.0+ds1+~cs29.3.1-1fixed
trixie10.7.2+ds1+~cs33.1.11-2fixed
forky, sid11.7.7+ds1+~cs36.3.16-1fixed
node-postcss (PTS)bullseye8.2.1+~cs5.3.23-8vulnerable
bullseye (security)8.2.1+~cs5.3.23-8+deb11u1vulnerable
bookworm8.4.20+~cs8.0.23-1+deb12u1vulnerable
trixie8.4.49+~cs9.2.32-1vulnerable
forky8.5.15+~cs9.3.39-1fixed
sid8.5.23+~cs10.2.23-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-mochasource(unstable)9.1.4+ds1+~cs28.2.8-1
node-postcsssource(unstable)8.5.8+~cs9.3.30-1

Notes

node-postcss bundles nanoid
node-mocha/9.1.4+ds1+~cs28.2.8-1 removes the node-nanoid copy
Fixed by: https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7 (5.1.6)

Search for package or bug name: Reporting problems