CVE-2026-67213nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | node-postcss | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | node-postcss | Under investigation | UBUNTU-CVE-2026-67213 | |
| Ubuntu 22.04 | node-postcss | Under investigation | UBUNTU-CVE-2026-67213 | |
| Ubuntu 20.04 | node-postcss | Fix pending | UBUNTU-CVE-2026-67213 | |
| Debian 14 | node-mocha | Fixed | 9.1.4+ds1+~cs28.2.8-1 | DEBIAN-CVE-2026-67213 |
| Debian 14 | node-postcss | Fixed | 8.5.8+~cs9.3.30-1 | DEBIAN-CVE-2026-67213 |
| Debian 13 | node-mocha | Fixed | 9.1.4+ds1+~cs28.2.8-1 | DEBIAN-CVE-2026-67213 |
| Debian 13 | node-postcss | Fix pending | DEBIAN-CVE-2026-67213 | |
| Debian 12 | node-mocha | Fixed | 9.1.4+ds1+~cs28.2.8-1 | DEBIAN-CVE-2026-67213 |
| Debian 12 | node-postcss | Fix pending | DEBIAN-CVE-2026-67213 | |
| Red Hat Enterprise Linux 10 | firefox | Not affected | ||
| Red Hat Enterprise Linux 10 | grafana | Not affected | ||
| Red Hat Enterprise Linux 10 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 10 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 9 | firefox | Not affected | ||
| Red Hat Enterprise Linux 9 | firefox-x11 | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana-pcp | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 9 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 8 | cargo | Not affected | ||
| Red Hat Enterprise Linux 8 | cargo-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | clippy | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-pcp | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 8 | rls | Not affected | ||
| Red Hat Enterprise Linux 8 | rust | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-analysis | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-analyzer | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-debugger-common | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-gdb | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-lldb | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-src | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-std-static | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-std-static-wasm32-unknown-unknown | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-std-static-wasm32-wasi | Not affected | ||
| Red Hat Enterprise Linux 8 | rust-toolset | Not affected | ||
| Red Hat Enterprise Linux 8 | rustfmt | Not affected | ||
| Red Hat Enterprise Linux 8 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 7 | firefox | Not affected | ||
| npm library | nanoid | Fixed | 3.3.18 | GHSA-2v37-7h3g-55p8 |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- nanoid_project nanoid: affected: 3.0.0 to before 3.3.17, 5.0.0 to before 5.1.6; fixed in
3.3.17,5.1.6
Vendor advisories:
- https://github.com/ai/nanoid/releases/tag/5.1.6 (release-notes)
- https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7 (patch)
References
- https://github.com/ai/nanoid/releases/tag/5.1.6
- https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7
- https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.