Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| nanoid_project | nanoid | 3.0.0 – < 3.3.17, 5.0.0 – < 5.1.6 | 3.3.17 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-mocha | 9.1.4+ds1+~cs28.2.8-1 | — |
| Debian 14 | node-postcss | 8.5.8+~cs9.3.30-1 | — |
| Debian 13 | node-mocha | 9.1.4+ds1+~cs28.2.8-1 | — |
| Debian 13 | node-postcss | No fix yet | — |
| Debian 12 | node-mocha | 9.1.4+ds1+~cs28.2.8-1 | — |
| Debian 12 | node-postcss | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | node-postcss | No fix yet | — |
| Ubuntu 22.04 LTS | node-postcss | No fix yet | — |
| Ubuntu 20.04 LTS | node-postcss | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hardened Images 1 | grafana12.4 | 12.4.6-0.2.hum1 | RHSA-2026:47619 |
| Red Hat Hardened Images 1 | grafana13.1 | 13.1.1-0.3.hum1 | RHSA-2026:48241 |
| Red Hat Hardened Images 1 | jaeger | 2.20.0-0.6.hum1 | RHSA-2026:47614 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | jitsucom-jitsu-console | 2.11.0-r32 | — |
| Wolfi rolling | json-server | 0.17.4-r11 | — |
| Wolfi rolling | jupyter-base-notebook | 7.6.3-r2 | — |
| Wolfi rolling | langfuse-3 +1 | 3.225.1-r1 | — |
| Wolfi rolling | langfuse-3-compat | 3.225.7-r6 | — |
| Wolfi rolling | nextcloud-server-33 | 33.0.7-r3 | — |
| Wolfi rolling | renovate | 44.23.3-r1 | — |
| Wolfi rolling | saf | 1.6.0-r4 | — |
| Wolfi rolling | vite | 8.2.1-r1 | — |
| Wolfi rolling | vitess-23 | 23.0.5-r8 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | nanoid | < 3.3.18 | 3.3.18 | GHSA-2v37-7h3g-55p8 |
| npm | nanoid | >= 4.0.0, < 5.1.6 | 5.1.6 | GHSA-2v37-7h3g-55p8 |
Advisories 6
- WID-SEC-2026-4056 Atlassian Produkte (Bamboo, Bitbucket, Confluence, Crucible, Fisheye und Jira): Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 11, 2026
- WID-SEC-2026-3596 IBM App Connect Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 10, 2026
- WID-SEC-2026-3376 Atlassian Bamboo, Bitbucket, Confluence, Fisheye/Crucible, Jira Software und Jira Service Management: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 10, 2026
- RHSA-2026:48241 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:47614 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:47619 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 20, 2026
References
- nanoid 5.1.6 release notes release-notes
- Fix commit (reject size of 0) patch
- VulnCheck Advisory: nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom third-party-advisory