{"id":"CVE-2026-67214","aliases":["CVE-2026-67214","GHSA-28wg-ghj8-5hjv"],"related":[],"kind":"vulnerability","state":"published","title":"nanoid Infinite Loop via Negative Size in non-secure module","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"nanoid (Nano ID) anterior a la versión 5.1.16 contiene un bucle infinito en las funciones customAlphabet y nanoid de su módulo no seguro (nanoid/non-secure). Cuando a estas funciones se les proporciona un tamaño negativo, el contador del bucle se decrementa desde un valor negativo y nunca alcanza su condición de terminación, girando indefinidamente y colgando el hilo de llamada. Una aplicación que pasa un tamaño negativo no validado y controlado por el atacante a estas funciones está expuesta a una condición de denegación de servicio.","source":"nvd"}],"published":"2026-07-29T13:32:02.265Z","modified":"2026-10-29T21:17:29.870Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.2,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"type":"semver","introduced":"4.0.0","fixed":"5.1.16","status":"affected"},{"type":"semver","version":"5.1.16","status":"unaffected"},{"type":"semver","introduced":"0","fixed":"3.3.16","status":"affected"},{"type":"semver","version":"3.3.16","status":"unaffected"}],"vendor":"nanoid_project","product":"nanoid","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.3.16"}],"ecosystem":"npm","package":"nanoid","purl":"pkg:npm/nanoid","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"5.1.16"}],"ecosystem":"npm","package":"nanoid","purl":"pkg:npm/nanoid","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.3.16"},{"status":"affected","introduced":"4.0.0","fixed":"5.1.16"}],"vendor":"nanoid_project","product":"nanoid","cpe":"cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ai/nanoid/releases/tag/5.1.16","tags":["product","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ai/nanoid/releases/tag/3.3.16","tags":["product","release-notes"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ai/nanoid/commit/6ccc67bbaba71d3d77a21d9b636f4171a268ce49","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-negative-size-in-non-secure-module","tags":["patch","release-notes","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67214","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/pull/600","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/pull/601","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/commit/e835c9b71eab832bc6106944bdd26ea96cf2c66d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-29T14:37:09.751Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-67214","url":"https://www.cve.org/CVERecord?id=CVE-2026-67214","licence":"CVE Terms of Use","modified":"2026-10-29T21:16:30.083Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-28wg-ghj8-5hjv","url":"https://github.com/advisories/GHSA-28wg-ghj8-5hjv","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:51.191Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-67214","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67214","licence":"Public domain","modified":"2026-10-29T21:17:29.870Z"}],"updatedAt":"2026-11-25T22:59:30.437Z","epss":{"score":0.00434,"percentile":0.39471,"date":"2026-12-01T12:00:22.000Z"}}