CVE-2026-67213
published high CVSS 4.0 · 8.2nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nanoid_project | — | nanoid3.0.0 to < 3.3.17 · 5.0.0 to < 5.1.6 · Other versions: affected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.2 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 5.9 | medium | VulnCheck · cna | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nanoid_project | nanoid | 3.0.0 to < 3.3.17 (affected · semver)5.0.0 to < 5.1.6 (affected · semver)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
References
3- Fix commit (reject size of 0) https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7
- nanoid 5.1.6 release notes https://github.com/ai/nanoid/releases/tag/5.1.6
- VulnCheck Advisory: nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom
Provider assertions
2VulnCheck · cna
nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5d0b3452bf5bba81d1d4f38a4f446b89f7288bfe3d25b23c53b0f12435a83b3f
- Ingested
- 09 Oct 2026, 16:32:33 UTC
- Source record
- Official CVE record