PT-2026-65812 · Npm · Nanoid
CVE-2026-67214
·
Published
2026-07-29
·
Updated
2026-08-21
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 versions prior to 5.1.16
Description
The non-secure module (nanoid/non-secure) contains an infinite loop within the
customAlphabet() and nanoid() functions. This occurs when these functions receive a negative value for the size parameter. Because the loop counter is decremented from a negative value, it never reaches the termination condition, causing the calling thread to hang. An application that allows an attacker to control the size parameter without validation is susceptible to a denial-of-service condition.Recommendations
Update to version 5.1.16 or later.
As a temporary mitigation, ensure that the size parameter passed to the
customAlphabet() and nanoid() functions is validated to be a non-negative integer.Exploit
Fix
DoS
Infinite Loop
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Nanoid