Skip to main content
EPSS 0.3%top 74%

CVE-2026-67214: Loop with Unreachable Exit Condition ('Infinite Loop') in nanoid_project nanoid

0
High
Published: 07/29/2026 (07/29/2026, 13:32:02 UTC)
Source: CVE Database V5
Vendor/Project: nanoid_project
Product: nanoid

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.

CVSS v4.0

Score 8.2high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

nanoid_project

nanoid

Affected versions
>=0 <5.1.16>=0 <3.3.16
nanoid
pkg:npm/nanoid
Affected versions
<5.1.16

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/05/2026, 15:07:32 UTC

Technical Analysis

The vulnerability in nanoid (Nano ID) prior to version 5.1.16 occurs in the non-secure module's customAlphabet and nanoid functions. When these functions receive a negative size argument, the loop counter starts from a negative value and decrements endlessly, never meeting the termination condition. This infinite loop causes the calling thread to hang, enabling a denial-of-service attack if an attacker can supply an unvalidated negative size parameter.

Potential Impact

An attacker who can control the size parameter passed to the affected functions can cause the application to enter an infinite loop, hanging the thread and resulting in a denial-of-service condition. This can degrade service availability and potentially disrupt application functionality.

Mitigation Recommendations

A fix is available in nanoid version 5.1.16 and later. Users should upgrade to version 5.1.16 or newer to remediate this vulnerability. Until upgraded, applications should validate input to ensure that negative sizes are not passed to the customAlphabet and nanoid functions in the non-secure module.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-07-28T18:13:39.684Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a6a093c9c2644c7f89a3154

Added to database: 07/29/2026, 14:07:56 UTC

Last enriched: 08/05/2026, 15:07:32 UTC

Last updated: 09/11/2026, 11:57:38 UTC

Views: 150

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses