Skip to main content
← All vulnerabilities
CVE-2026-67213GHSA-2V37-7H3G-55P8

nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.3.17, 5.1.6, 3.3.18
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • nanoid_project nanoid

    From 3.0.0 · fixed in 3.3.17; From 5.0.0 · fixed in 5.1.6

  • nanoidnpm

    fixed in 3.3.18

  • nanoidnpm

    From 4.0.0 · fixed in 5.1.6

References 3

GitHub · ai/nanoid

vulncheck.com