Skip to main content
VulnerabilityPublished Updated

CVE-2026-67213: nanoid · Infinite Loop

Affects nanoidSource CVE Database V5

0

Not known to be exploited · CVSS 8.2 High : upgrade to 5.1.6 soon.

Data as of 28 Oct 2026, 05:11 UTC

CVSS 4.0 base score
8.2High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 26% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.1.6
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade nanoid to 5.1.6.

Affected software

ProductAffectedFixed in
nanoid_projectnanoidAffected
  • >=3.0.0 <3.3.17
  • >=5.0.0 <5.1.6
Fixed in–
npmnanoidpkg:npm/nanoidOther threatsAffected
  • <5.1.6
Fixed in
  • 5.1.6

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Patch to nanoid version 5.1.6 or later where this infinite loop issue is fixed. Until patched, ensure that the size parameter passed to customAlphabet and customRandom functions is validated to never be 0 to prevent triggering the infinite loop.

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.

References

Community reviews

Loading reviews…