{"id":"CVE-2026-67214","published":"2026-07-29T13:32:02Z","modified":"2026-10-29T21:16:30Z","title":"nanoid Infinite Loop via Negative Size in non-secure module","vendor":"nanoid_project","product":"nanoid","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00607,"percentile":0.43167,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://github.com/ai/nanoid/releases/tag/5.1.16","tags":["release-notes"]},{"url":"https://github.com/ai/nanoid/releases/tag/3.3.16","tags":["release-notes"]},{"url":"https://github.com/ai/nanoid/commit/6ccc67bbaba71d3d77a21d9b636f4171a268ce49","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-negative-size-in-non-secure-module","tags":["third-party-advisory"]}],"priority":{"score":12.8,"factors":[{"name":"EPSS percentile","points":8.63},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"nanoid-project","affectedVersions":[{"vendor":"nanoid_project","product":"nanoid","versions":[">= 4.0.0, < 5.1.16","< 3.3.16"]}],"fixedVersions":[{"vendor":"nanoid_project","product":"nanoid","versions":["5.1.16","3.3.16"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-29T14:37:09.751333Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"nanoid","vulnerableRanges":["<3.3.16",">=4.0.0, <5.1.16"],"patched":["3.3.16","5.1.16"],"from":["GHSA-28wg-ghj8-5hjv"],"provenance":"source"}],"summary":{"text":"The nanoid package before 3.3.16 and 5.1.16 has an infinite loop in the customAlphabet and nanoid functions of its non-secure module (nanoid/non-secure), which never terminates when given a negative size. An attacker who can supply an unvalidated negative size to an application calling these functions over the network, without authentication or user interaction, can hang the calling thread and cause a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:07:16Z"},"euvd":{"id":"EUVD-2026-50326","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-nanoid-project-nanoid-cve-2026-67213","packageHistory":[{"cve":"CVE-2024-55565","published":"2024-12-09","fixed":"5.0.9","kev":false},{"cve":"CVE-2026-67213","published":"2026-07-29","fixed":"5.1.6","kev":false,"link":{"from":"CVE-2026-67214","to":"CVE-2026-67213","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:nanoid","fromFixed":"3.3.16","toFixed":"3.3.18","daysApart":0},{"kind":"similar","provenance":"machine","score":0.68,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-73086","published":"2026-08-11","fixed":"5.1.11","kev":false},{"cve":"CVE-2026-67214","published":"2026-07-29","fixed":"5.1.16","kev":false}],"package":"npm:nanoid"}}