Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
CVE-2026-67214high8.2

nanoid Infinite Loop via Negative Size in non-secure module

Impact

nanoid before 3.3.16 and 5.1.16 has an infinite loop in its non-secure module when given a negative size, potentially causing a denial-of-service condition if an attacker-controlled negative size is passed to the customAlphabet or nanoid functions. The affected versions are those less than 3.3.16 and 5.1.16. An application is exposed if it passes an unvalidated, attacker-controlled negative size to these functions.

Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.

Affected packages

This source has no supported package-version data for matching. You can read the advisory here, but this record alone cannot power a dependency check.

Affected products

Vendor version evidence. Product records are separate from automatic dependency matching.

nanoid_project · VulnCheck

nanoid

4 ranges

Package identity

pkg:npm/nanoidExplore nanoid →

Identity supplied by VulnCheck. Version matching requires compatible range evidence.

Compare with this publisher’s ranges. This does not inspect your installation.

affected

4.0.0 → before 5.1.16

semver versions

0 → before 3.3.16

semver versions

unaffected

5.1.16

semver versions

3.3.16

semver versions

unknown

Other versions: unaffected

Original source 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.

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification
Additional publishers

Describes the evidence in this view, not whether the product is safe.

Original records

CVE-2026-67214

View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.

cve.new JSON →

Underlying weaknesses

The source’s classification of what caused the vulnerability.

CWE-835 ↗

Loop with Unreachable Exit Condition ('Infinite Loop')

VulnCheck

Related →

Environment requirements

These conditions apply together as specified by the publisher. A matching product name alone does not establish exposure.

VulnCheck · platform conditions

Any condition may hold

Vulnerable product

cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*

From (inclusive): 4.0.0

Before: 5.1.16

Vulnerable product

cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*

Before: 3.3.16

Original applicability statements
[
  {
    "nodes": [
      {
        "operator": "OR",
        "cpeMatch": [
          {
            "vulnerable": true,
            "criteria": "cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*",
            "versionEndExcluding": "5.1.16",
            "versionStartIncluding": "4.0.0"
          },
          {
            "vulnerable": true,
            "criteria": "cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*",
            "versionEndExcluding": "3.3.16"
          }
        ]
      }
    ]
  }
]
Contributing organizations · 2
VulnCheck

Assigning organization

2026-10-29
CISA-ADP

Additional data publisher

2026-07-29

What changed

Follow changes
No substantive changes have been recorded here yet. History starts when cve.new observes a change after tracking is enabled; earlier edits are not reconstructed.

Large field values are marked as truncated previews. Original source snapshots remain retained.

References

4 sources