CVE-2026-67214

nanoid Infinite Loop via Negative Size in non-secure module

State
Published
Severity
8.2 High
Published
Jul 29, 2026
Updated
Oct 29, 2026
Reserved
Jul 28, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
4.08.2 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NVulnCheck
3.15.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HVulnCheck

Weaknesses

  • CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')

Affected Products

ProductVersions
nanoidnanoid_project
  • 4.0.0 to before 5.1.16Affected
  • 5.1.16Not affected
  • before 3.3.16Affected
  • 3.3.16Not affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.