cve.bz

CVE-2026-67213 nanoid project nanoid: Infinite Loop

8.2 highEPSS 0.3%Fix available

High (8.2) in nanoid project nanoid. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in nanoid 3.3.18, 5.1.6.

On this page
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.

Severity

CVSS 4.0

8.2 high
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

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 27th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-07-29. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-835 Loop with Unreachable Exit Condition (Infinite Loop)
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-67213 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-67213?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-67213?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-67213 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
nanoid_project nanoidfrom 3.0.0 before 3.3.17
nanoid_project nanoidfrom 5.0.0 before 5.1.6

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-2v37-7h3g-55p8npmnanoid<3.3.183.3.18
GHSA-2v37-7h3g-55p8npmnanoid>=4.0.0 <5.1.65.1.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-postcssno fix listedDEBIAN-CVE-2026-67213
Debian12, 13, 14node-mocha9.1.4+ds1+~cs28.2.8-1DEBIAN-CVE-2026-67213
Debian14node-postcss8.5.8+~cs9.3.30-1DEBIAN-CVE-2026-67213
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-67213
Red Hathummingbird:1grafana12.40:12.4.6-0.2.hum1RHSA-2026:47619
Red Hathummingbird:1grafana13.10:13.1.1-0.3.hum1RHSA-2026:48241
Red Hathummingbird:1jaeger0:2.20.0-0.6.hum1RHSA-2026:47614

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Important.

Red Hat's statement

An algorithmic denial of service flaw was found in the `nanoid` library. When calling `customAlphabet` or `customRandom` with a `size` parameter of `0`, the internal generation loop fails to meet its termination condition. In Node.js or browser execution contexts, an attacker who supplies an unvalidated, zero-value size parameter to these functions causes the thread to enter an infinite loop, driving CPU utilization to 100% and completely blocking event loop execution for that thread.

Red Hat's mitigation

To mitigate this issue, ensure application code validates the size parameter passed to customAlphabet or customRandom, rejecting or sanitizing zero-value inputs before passing them to nanoid.

ProductPackageStateAdvisory
multicluster engine for Kubernetes 2.17multicluster-engine/console-mce-rhel9:1786668856Fixed 2026-08-25RHSA-2026:59593
multicluster engine for Kubernetes 2.8multicluster-engine/console-mce-rhel9:1787259048Fixed 2026-08-25RHSA-2026:59558
multicluster engine for Kubernetes 2.9multicluster-engine/console-mce-rhel9:1787079359Fixed 2026-08-25RHSA-2026:59559
Network Observability (NETOBSERV) 1.12.3network-observability/network-observability-console-plugin-pf5-rhel9:1789978780Fixed 2026-09-23RHSA-2026:70593
Red Hat Advanced Cluster Management for Kubernetes 2.11rhacm2/console-rhel9:1787687062Fixed 2026-08-26RHSA-2026:60387
Red Hat Advanced Cluster Management for Kubernetes 2.13rhacm2/console-rhel9:1787339249Fixed 2026-08-26RHSA-2026:60390
Red Hat Advanced Cluster Management for Kubernetes 2.14rhacm2/console-rhel9:1787339248Fixed 2026-08-26RHSA-2026:60388
Red Hat Advanced Cluster Management for Kubernetes 2.17rhacm2/console-rhel9:1787335105Fixed 2026-08-26RHSA-2026:60386
Red Hat Ansible Automation Platform 2.1ansible-automation-platform/automation-portal:1788775748Fixed 2026-09-08RHSA-2026:65118
Red Hat Ansible Automation Platform 2.2ansible-automation-platform/automation-portal:1788783591Fixed 2026-09-08RHSA-2026:65155
Gatekeeper 3gatekeeper/gatekeeper-rhel9Not affected
Migration Toolkit for Containersrhmtc/openshift-migration-ui-rhel8Will not fix
Node HealthCheck Operatorworkload-availability/node-healthcheck-must-gather-rhel9Affected
Node HealthCheck Operatorworkload-availability/node-healthcheck-operator-bundleAffected
Node HealthCheck Operatorworkload-availability/node-healthcheck-rhel9-operatorAffected
Node HealthCheck Operatorworkload-availability/node-remediation-console-rhel8Affected
OpenShift Lightspeedopenshift-lightspeed/lightspeed-agentic-console-rhel9Affected
OpenShift Lightspeedopenshift-lightspeed/lightspeed-console-plugin-419-rhel9Affected
OpenShift Lightspeedopenshift-lightspeed/lightspeed-console-plugin-pf5-rhel9Affected
OpenShift Lightspeedopenshift-lightspeed/lightspeed-console-plugin-rhel9Affected
100 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-67213.

References

Check your stackJSON