CVE-2026-67214 — nanoid
Fix: ai/nanoid@6ccc67bCVE-2026-67214 is a CWE-835 vulnerability in nanoid. A fix is available for nanoid — see the affected versions and patch details below.
nanoid Infinite Loop via Negative Size in non-secure module
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-67214.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
nanoidnpmDescription
nanoid (Nano ID) before 3.3.16 and 5.1.16 contains an infinite loop in the customAlphabet and nanoid functions of its non-secure module (nanoid/non-secure). When these functions are given a negative size, the loop counter is decremented from a negative value and never reaches its termination condition, spinning indefinitely and hanging the calling thread. An application that passes an unvalidated, attacker-controlled negative size to these functions is exposed to a denial-of-service condition.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | nanoid | all versions | 3.3.16npm install nanoid@3.3.16 |
| 📦npm | nanoid | ≥ 4.0.0&&< 5.1.16 | 5.1.16npm install nanoid@5.1.16 |
Affected Products
nanoidnanoid_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nanoid, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update nanoid to 3.3.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-67214 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
An input validation flaw in Nano ID's non-secure module (`nanoid/non-secure`) causes an infinite loop in the `customAlphabet` and `nanoid` functions when processed with a negative size parameter. Because the decrementing loop counter never meets its termination condition, an unauthenticated attacker who passes an…
Sanitize all user-supplied integer inputs before passing them to `nanoid` or `customAlphabet` functions in the `nanoid/non-secure` module, ensuring the size parameter is strictly a non-negative integer.Source: Red Hat security advisory for CVE-2026-67214 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.6 for RHEL 9 | automation-platform-ui-0:2.6.14-1.el9ap | RHSA-2026:71113 |
| multicluster engine for Kubernetes 2.17 | multicluster-engine/console-mce-rhel9:1786668856 | RHSA-2026:59593 |
| multicluster engine for Kubernetes 2.8 | multicluster-engine/console-mce-rhel9:1787259048 | RHSA-2026:59558 |
| multicluster engine for Kubernetes 2.9 | multicluster-engine/console-mce-rhel9:1787079359 | RHSA-2026:59559 |
| Red Hat Advanced Cluster Management for Kubernetes 2.11 | rhacm2/console-rhel9:1787687062 | RHSA-2026:60387 |
| Red Hat Advanced Cluster Management for Kubernetes 2.13 | rhacm2/console-rhel9:1787339249 | RHSA-2026:60390 |
| Red Hat Advanced Cluster Management for Kubernetes 2.14 | rhacm2/console-rhel9:1787339248 | RHSA-2026:60388 |
| Red Hat Advanced Cluster Management for Kubernetes 2.17 | rhacm2/console-rhel9:1787335105 | RHSA-2026:60386 |
Frequently Asked Questions
Is CVE-2026-67214 in your dependencies?
Find it across npm, including transitive dependencies.