{"id":"CVE-2026-67213","revision":"f472e5f228bd4ec59414aaaf4e833496","records":[{"revision":"f472e5f228bd4ec59414aaaf4e833496","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-67213","aliases":[],"title":"nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom","description":"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.","state":0,"publishedAt":"2026-07-29T13:32:01.534+00:00","modifiedAt":"2026-10-08T15:24:01.606+00:00","affected":[{"ecosystem":"Vendor product","name":"nanoid","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"nanoid_project\",\n                    \"product\": \"nanoid\",\n                    \"defaultStatus\": \"affected\",\n                    \"versions\": [\n                        {\n                            \"version\": \"3.0.0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"3.3.17\"\n                        },\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"5.0.0\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"5.1.6\"\n                        }\n                    ],\n                    \"packageURL\": \"pkg:npm/nanoid\"\n                }"}],"metrics":[{"system":"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,"severity":"HIGH"},{"system":"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,"severity":"MEDIUM"}],"references":["https://github.com/ai/nanoid/releases/tag/5.1.6","https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7","https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-67213","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-67213","identifiers":["CVE-2026-67213"]},"retained":false,"historicalAffected":[]}],"coverage":[]}