Skip to content
Heist/ feed
High

nanoid Infinite Loop via Negative Size in non-secure module

Type: advisorySource: Official CVE List1 source record

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.

Announced Group revision 1
Original source ↗

CVE-2026-67214

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-67214

nanoid

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "nanoid_project",
    "product": "nanoid",
    "versions": [
      {
        "status": "affected",
        "version": "0",
        "lessThan": "5.1.16",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.1.16",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "0",
        "lessThan": "3.3.16",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "3.3.16",
        "versionType": "semver"
      }
    ],
    "packageURL": "pkg:npm/nanoid",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-67214

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#12801 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement