
CVE catalog
CVE-2026-67213
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 satis
- Severity
- High · CVSS 8.2
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.33% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | node-mocha | sid | 12.0.3+~cs20.0.13-3 | fixed |
| Debian | node-mocha | forky | 12.0.3+~cs20.0.13-3 | fixed |
| Debian | node-mocha | trixie | 10.7.2+ds1+~cs33.1.11-2 | fixed |
| Debian | node-mocha | bookworm | 10.1.0+ds1+~cs29.3.1-1 | fixed |
| Debian | node-postcss | sid | 8.5.31+~cs10.2.26-1 | fixed |
| Debian | node-postcss | forky | 8.5.31+~cs10.2.26-1 | fixed |
| Debian | node-postcss | trixie | 8.4.49+~cs9.2.32-1 | vulnerable |
| Debian | node-postcss | bookworm | 8.4.20+~cs8.0.23-1+deb12u1 | vulnerable |
| Npm | nanoid | Not reported | 5.1.6 | fixed |
| Npm | nanoid | Not reported | 5.1.6 | fixed |
| Cpe | nanoid | Not reported | 5.1.6 | fixed |
| Ubuntu | node-postcss | 20.04 | 6.0.23-1 | vulnerable |
| Ubuntu | node-postcss | 20.04 | 6.0.23-3 | vulnerable |
| Ubuntu | node-postcss | 22.04 | 8.2.1+~cs5.3.23-8 | vulnerable |
| Ubuntu | node-postcss | 22.04 | 8.4.5+~cs7.1.51-2 | vulnerable |
| Ubuntu | node-postcss | 22.04 | 8.4.6+~cs7.3.21-1 | vulnerable |
| Ubuntu | node-postcss | 24.04 | 8.4.20+~cs8.0.23-1 | vulnerable |
| Ubuntu | node-postcss | 24.04 | 8.4.31+~cs8.0.26-1 | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | node-mocha | source | sid | 9.1.4+ds1+~cs28.2.8-1 | not yet assigned | Not reported | Not reported |
| Debian | node-mocha | source | forky | 9.1.4+ds1+~cs28.2.8-1 | not yet assigned | Not reported | Not reported |
| Debian | node-mocha | source | trixie | 9.1.4+ds1+~cs28.2.8-1 | not yet assigned | Not reported | Not reported |
| Debian | node-mocha | source | bookworm | 9.1.4+ds1+~cs28.2.8-1 | not yet assigned | Not reported | Not reported |
| Debian | node-postcss | source | sid | 8.5.8+~cs9.3.30-1 | not yet assigned | Not reported | Not reported |
| Debian | node-postcss | source | forky | 8.5.8+~cs9.3.30-1 | not yet assigned | Not reported | Not reported |
| Debian | node-postcss | source | trixie | (unfixed) | not yet assigned | Not reported | Not reported |
| Debian | node-postcss | source | bookworm | (unfixed) | not yet assigned | Not reported | Not reported |
| Npm | nanoid | npm | Not reported | 5.1.6 | Not reported | GHSA-2V37-7H3G-55P8 | Not reported |
| Npm | nanoid | npm | Not reported | 5.1.6 | Not reported | Not reported | Not reported |
| Cpe | nanoid | cpe | Not reported | 5.1.6 | Not reported | NVD-CVE-2026-67213 | Not reported |
Notes
[trixie] node-postcss: Minor issue [bookworm] node-postcss: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [node-postcss]Affected
Details (2)
8.4.20+~cs8.0.23-1+deb12u1· all · bookwormAffected
nvd · node-postcss · debian · bookworm; nvd · node-postcss · debian · 12
8.4.20+~cs8.0.23-1+deb12u1· all · bookwormAffected
nvd · node-postcss · debian · bookworm; nvd · node-postcss · debian · 12
- [mocha]Fixed
Source package: [node-mocha]
Details (2)
10.1.0+ds1+~cs29.3.1-1· all · bookwormFixed · Fixed:
9.1.4+ds1+~cs28.2.8-1nvd · node-mocha · debian · bookworm; nvd · node-mocha · debian · 12
10.1.0+ds1+~cs29.3.1-1· all · bookwormFixed · Fixed:
9.1.4+ds1+~cs28.2.8-1nvd · node-mocha · debian · bookworm; nvd · node-mocha · debian · 12
[Debian 13 (Trixie)]
- [node-postcss]Affected
Details (2)
8.4.49+~cs9.2.32-1· all · trixieAffected
nvd · node-postcss · debian · 13
8.4.49+~cs9.2.32-1· all · trixieAffected
nvd · node-postcss · debian · 13
- [mocha]Fixed
Source package: [node-mocha]
Details (2)
10.7.2+ds1+~cs33.1.11-2· all · trixieFixed · Fixed:
9.1.4+ds1+~cs28.2.8-1nvd · node-mocha · debian · 13
10.7.2+ds1+~cs33.1.11-2· all · trixieFixed · Fixed:
9.1.4+ds1+~cs28.2.8-1nvd · node-mocha · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/]
- [https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7]
- [https://github.com/ai/nanoid/releases/tag/5.1.6]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-67213]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-67213]
- [https://osv.dev/vulnerability/GHSA-2v37-7h3g-55p8]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2026-67213]
- [https://security-tracker.debian.org/tracker/CVE-2026-67213]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-67213.json]
- [https://wid.cert-bund.de/.well-known/csaf/white/2026/wid-sec-w-2026-3376.json]
- [https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom]
[CERT-Bund public advisories] · [Debian Security Tracker] · [FIRST EPSS] · [GitHub Advisory Database] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]