Skip to main content

nanoid EUVDEUVD-2026-50326

| CVE-2026-67214 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-07-29 VulnCheck GHSA-28wg-ghj8-5hjv
8.2
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
8.2 HIGH
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
5.9 MEDIUM

Network-reachable only when the app forwards unvalidated negative size, an application-specific precondition modeled as AC:H; availability-only impact so C:N/I:N/A:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat
7.5 HIGH
qualitative

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Jul 29, 2026 - 14:22 vuln.today
Analysis Generated
Jul 29, 2026 - 14:22 vuln.today
CVE Published
Jul 29, 2026 - 13:32 cve.org
HIGH 8.2

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 227 npm packages depend on nanoid (84 direct, 146 indirect)

Ecosystem-wide dependent count for version 4.0.0.

DescriptionCVE.org

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.

AnalysisAI

Denial-of-service in the nanoid JavaScript library (versions before 5.1.16) lets an attacker hang a Node.js/browser thread by supplying a negative size to the customAlphabet or nanoid functions of the non-secure module (nanoid/non-secure). Because the internal loop counter is decremented from a negative starting value, it never satisfies its termination condition and spins forever, consuming CPU and blocking the event loop. Reported by VulnCheck with a patch shipped in 5.1.16; no public exploit identified at time of analysis and it is not listed in CISA KEV.

Technical ContextAI

nanoid is a very small, widely used ID/string generator for JavaScript. The flaw is CWE-835 (Loop with Unreachable Exit Condition / infinite loop) in the non-secure entry point (nanoid/non-secure), which trades cryptographic randomness for speed and is commonly used for non-security identifiers. The affected CPE is cpe:2.3:a:nanoid_project:nanoid. Internally these functions build the output by looping while decrementing a length counter toward zero; a negative size means the counter starts below the termination boundary and is decremented further, so the exit condition is never met and the single-threaded JavaScript runtime hangs on that call, stalling the whole event loop rather than merely returning a bad value.

RemediationAI

Vendor-released patch: 5.1.16 - upgrade the nanoid dependency to 5.1.16 or later (fix commit https://github.com/ai/nanoid/commit/6ccc67bbaba71d3d77a21d9b636f4171a268ce49, release https://github.com/ai/nanoid/releases/tag/5.1.16), and update transitive copies pulled in by other packages via a lockfile refresh or a package-manager override/resolution. As a compensating control until upgrade, validate and clamp the size argument before calling customAlphabet/nanoid - reject non-integer or negative values and enforce a sane maximum - so that no attacker-controlled value reaches the loop; this has negligible side effects since negative lengths are never legitimate. Where feasible, prefer the default secure nanoid entry point over nanoid/non-secure, noting the secure module is slightly slower and requires a crypto source.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected

Share

EUVD-2026-50326 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy