CVE-2026-67214
HIGH 8.2CVSS 4.0nanoid: non-secure generators can loop indefinitely with negative size
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.
- Published
- 29 Jul 2026
- Last modified
- 29 Oct 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Analyzed
- Weakness
- CWE-835
- Also known as
- GHSA-28wg-ghj8-5hjv
- Sources
- NVDJSONOSV GHSA-28wg-ghj8-5hjvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | HIGH 8.2 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | nanoid_project | nanoidcpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:* |
< 3.3.16 | 3.3.16 |
| NVD | nanoid_project | nanoidcpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:* |
>= 4.0.0, < 5.1.16 | 5.1.16 |
| OSV | npm | nanoid | < 3.3.16 | 3.3.16 |
| OSV | npm | nanoid | >= 4.0.0, < 5.1.16 | 5.1.16 |
References
- https://github.com/ai/nanoid/commit/6ccc67bbaba71d3d77a21d9b636f4171a268ce49 · Patch, WEB
- https://github.com/ai/nanoid/releases/tag/3.3.16 · Product, Release Notes
- https://github.com/ai/nanoid/releases/tag/5.1.16 · Product, Release Notes, WEB
- https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-negative-size-in-non-secure-module · Patch, Release Notes, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-67214 · ADVISORY
- https://github.com/ai/nanoid/pull/600 · WEB
- https://github.com/ai/nanoid/pull/601 · WEB
- https://github.com/ai/nanoid/commit/e835c9b71eab832bc6106944bdd26ea96cf2c66d · WEB
- https://github.com/ai/nanoid · PACKAGE
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 29 Jul 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 29 Jul 2026)