CVE-2026-67214: nanoid · Infinite Loop
Affects nanoidSource CVE Database V5
Not known to be exploited · CVSS 8.2 High : upgrade to 5.1.16 or 3.3.16 soon.
Data as of 27 Oct 2026, 05:11 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 25% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.1.16, 3.3.16
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade nanoid to 5.1.16 or 3.3.16; nanoid to 5.1.16.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| nanoid_projectnanoid | Affected
| Fixed in
|
| nanoid_projectnanoid | Affected
| Fixed in
|
npmnanoidpkg:npm/nanoidOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in nanoid version 5.1.16 and later. Users should upgrade to version 5.1.16 or newer to remediate this vulnerability. Until upgraded, applications should validate input to ensure that negative sizes are not passed to the customAlphabet and nanoid functions in the non-secure module.
Description
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.
References
- github.com/ai/nanoid/releases/tag/5.1.16 (opens in a new tab)
- github.com/ai/nanoid/commit/6ccc67bbaba71d3d77a21d9b636f4171a268ce49 (opens in a new tab)
- vulncheck.com/advisories/nanoid-before-infinite-loop-via-negative-size-in-non-secure-module (opens in a new tab)
- github.com/ai/nanoid/releases/tag/3.3.16 (opens in a new tab)