PT-2026-65811 · Npm · Nanoid
CVE-2026-67213
·
Published
2026-07-29
·
Updated
2026-07-29
CVSS v4.0
8.2
High
| Vector | AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
anoid (Nano ID) versions prior to 5.1.6
Description
The
customAlphabet() and customRandom() functions contain an infinite loop. 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, which is a state where a system becomes unavailable to its intended users.Recommendations
Update nanoid (Nano ID) to version 5.1.6 or later.
As a temporary workaround, avoid passing unvalidated user input to the size parameter of the
customAlphabet() and customRandom() functions.Exploit
Fix
Infinite Loop
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Nanoid