CVE-2026-67213 Details
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.
A denial-of-service vulnerability has been identified in nanoid (Nano ID) versions prior to 5.1.6. The issue arises in the customAlphabet and customRandom functions, where a size of 0 can be passed, leading to an infinite loop. This loop never exits, causing the calling thread to hang indefinitely. Applications that allow unvalidated, attacker-controlled sizes to these functions are particularly at risk.
Users can upgrade to nanoid version 5.1.6 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7 | [email protected] | Patch |
| https://github.com/ai/nanoid/releases/tag/5.1.6 | [email protected] | ProductRelease Notes |
| https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom | [email protected] | PatchRelease NotesThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-835 | Loop with Unreachable Exit Condition ('Infinite Loop') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| nanoid project nanoid | >= 3.0.0, < 3.3.17 >= 5.0.0, < 5.1.6 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 18, 2026 | Initial Analysis | [email protected] |
| Aug 10, 2026 | CVE Modified | [email protected] |
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 29, 2026 | New CVE Received | [email protected] |