{"id":"CVE-2026-67213","aliases":["CVE-2026-67213","GHSA-2v37-7h3g-55p8"],"related":[],"kind":"vulnerability","state":"published","title":"nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom","summary":"nanoid (Nano ID) before 5.1.6 contains an infinite loop in the customAlphabet and customRandom functions. When these functions are configured with a size of 0, the internal generation loop never satisfies its exit condition and spins indefinitely, hanging the calling thread. An application that passes an unvalidated, attacker-controlled size of 0 to these functions is exposed to a denial-of-service condition.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"nanoid (Nano ID) before 5.1.6 contains an infinite loop in the customAlphabet and customRandom functions. When these functions are configured with a size of 0, the internal generation loop never satisfies its exit condition and spins indefinitely, hanging the calling thread. An application that passes an unvalidated, attacker-controlled size of 0 to these functions is exposed to a denial-of-service condition.","source":"cvelist"},{"lang":"es","text":"nanoid (Nano ID) antes de 5.1.6 contiene un bucle infinito en las funciones customAlphabet y customRandom. Cuando estas funciones se configuran con un tamaño de 0, el bucle de generación interno nunca satisface su condición de salida y gira indefinidamente, colgando el hilo de llamada. Una aplicación que pasa un tamaño de 0 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:01.534Z","modified":"2026-10-23T23:10:00.157Z","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":"3.0.0","fixed":"3.3.17","status":"affected"},{"type":"semver","introduced":"5.0.0","fixed":"5.1.6","status":"affected"}],"vendor":"nanoid_project","product":"nanoid","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.3.18"}],"ecosystem":"npm","package":"nanoid","purl":"pkg:npm/nanoid","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"5.1.6"}],"ecosystem":"npm","package":"nanoid","purl":"pkg:npm/nanoid","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"3.3.17"},{"status":"affected","introduced":"5.0.0","fixed":"5.1.6"}],"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.6","tags":["product","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom","tags":["patch","release-notes","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67213","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/commit/e10f8d40ce9d1ab47f66d65a16b48086432730d0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/commit/f9d13f150847d117877adee3460a46eceb0cf49b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/releases/tag/3.3.17","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid/releases/tag/3.3.18","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-29T14:41:51.480Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-67213","url":"https://www.cve.org/CVERecord?id=CVE-2026-67213","licence":"CVE Terms of Use","modified":"2026-10-08T15:24:01.606Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2v37-7h3g-55p8","url":"https://github.com/advisories/GHSA-2v37-7h3g-55p8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:51.243Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-67213","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67213","licence":"Public domain","modified":"2026-10-23T23:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:30.436Z","epss":{"score":0.00331,"percentile":0.28302,"date":"2026-12-01T12:00:22.000Z"}}