NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

nanoid: non-secure generators can loop indefinitely with negative sizeGHSA-28wg-ghj8-5hjv

MEDIUMFix: ai/nanoid#600

GHSA-28wg-ghj8-5hjv is a medium-severity (CVSS 5.9) CWE-835 vulnerability in nanoid. A fix is available for nanoid — see the affected versions and patch details below.

Also known asCVE-2026-67214
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-28wg-ghj8-5hjv.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs27th percentile — riskier than 27% of all scored CVEsHighest risk
0.00%0.28%0.55%0.83%0.3%0.3%0.3%0.3%0.3%Aug 26Oct 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

18Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
nanoidnpm
398.9Mdownloads / week

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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmnanoidall versions3.3.16npm install nanoid@3.3.16
📦npmnanoid≥ 4.0.0&&< 5.1.165.1.16npm install nanoid@5.1.16

Affected Products

1 product · 2 configurations
Application
nanoidnanoid_project
≥ 4.0.0 && < 5.1.16
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nanoid, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update nanoid to 3.3.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-28wg-ghj8-5hjv is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

An input validation flaw in Nano ID's non-secure module (`nanoid/non-secure`) causes an infinite loop in the `customAlphabet` and `nanoid` functions when processed with a negative size parameter. Because the decrementing loop counter never meets its termination condition, an unauthenticated attacker who passes an…

Workaround published by Red Hat
Sanitize all user-supplied integer inputs before passing them to `nanoid` or `customAlphabet` functions in the `nanoid/non-secure` module, ensuring the size parameter is strictly a non-negative integer.
Source: Red Hat security advisory for GHSA-28wg-ghj8-5hjv (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Ansible Automation Platform 2.6 for RHEL 9automation-platform-ui-0:2.6.14-1.el9apRHSA-2026:71113
multicluster engine for Kubernetes 2.17multicluster-engine/console-mce-rhel9:1786668856RHSA-2026:59593
multicluster engine for Kubernetes 2.8multicluster-engine/console-mce-rhel9:1787259048RHSA-2026:59558
multicluster engine for Kubernetes 2.9multicluster-engine/console-mce-rhel9:1787079359RHSA-2026:59559
Red Hat Advanced Cluster Management for Kubernetes 2.11rhacm2/console-rhel9:1787687062RHSA-2026:60387
Red Hat Advanced Cluster Management for Kubernetes 2.13rhacm2/console-rhel9:1787339249RHSA-2026:60390
Red Hat Advanced Cluster Management for Kubernetes 2.14rhacm2/console-rhel9:1787339248RHSA-2026:60388
Red Hat Advanced Cluster Management for Kubernetes 2.17rhacm2/console-rhel9:1787335105RHSA-2026:60386

Frequently Asked Questions

nanoid (Nano ID) before 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.
O3 Security · Impact-Aware SCA

Is GHSA-28wg-ghj8-5hjv in your dependencies?

Find it across npm, including transitive dependencies.

GHSA-28wg-ghj8-5hjv: nanoid — Fixed in 3.3.16