{"id":"CVE-2026-67213","aliases":["GHSA-2v37-7h3g-55p8"],"url":"https://o3.security/vulnerability/CVE-2026-67213","summary":"nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom","details":"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.","published":"2026-07-29T13:32:01.534Z","modified":"2026-08-20T03:54:38.986062232Z","cvss":null,"epss":{"score":0.00319,"percentile":0.24699,"asOf":"2026-09-14"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"nanoid","fixedVersion":"3.3.18"},{"ecosystem":"npm","name":"nanoid","fixedVersion":"5.1.6"}],"fix":{"url":"https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7","label":"ai/nanoid@cb3626d"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/67xxx/CVE-2026-67213.json"},{"type":"ADVISORY","url":"https://github.com/ai/nanoid/releases/tag/5.1.6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67213"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom"},{"type":"FIX","url":"https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-20T03:54:38.986062232Z"}}