{"id":"CVE-2026-67213","state":"PUBLISHED","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.","publishedAt":"2026-07-29T13:32:01.534Z","updatedAt":"2026-10-08T15:24:01.606Z","severity":{"score":8.2,"label":"High","version":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["nanoid_project nanoid"],"affected":[{"vendor":"nanoid_project","product":"nanoid","packageURL":"pkg:npm/nanoid","defaultStatus":"affected","versions":[{"version":"3.0.0","status":"affected","lessThan":"3.3.17","versionType":"semver"},{"version":"5.0.0","status":"affected","lessThan":"5.1.6","versionType":"semver"}]}],"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"],"weaknesses":["CWE-835"],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/67xxx/CVE-2026-67213.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-67213","state":"PUBLISHED","datePublished":"2026-07-29T13:32:01.534Z","dateUpdated":"2026-10-08T15:24:01.606Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-07-28T18:13:39.684Z"},"containers":{"cna":{"title":"nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"nanoid_project","product":"nanoid","packageURL":"pkg:npm/nanoid","defaultStatus":"affected","versions":[{"version":"3.0.0","status":"affected","lessThan":"3.3.17","versionType":"semver"},{"version":"5.0.0","status":"affected","lessThan":"5.1.6","versionType":"semver"}]}],"references":[{"url":"https://github.com/ai/nanoid/releases/tag/5.1.6","tags":["release-notes"],"name":"nanoid 5.1.6 release notes"},{"url":"https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7","tags":["patch"],"name":"Fix commit (reject size of 0)"},{"url":"https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom","name":"VulnCheck Advisory: nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.2,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","version":"3.1","baseSeverity":"MEDIUM","baseScore":5.9,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-835","lang":"en","description":"Loop with Unreachable Exit Condition ('Infinite Loop')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-10-08T15:24:01.606Z"},"datePublic":"2025-09-22T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*","versionEndExcluding":"5.1.6"}]}]}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-29T14:41:51.480372Z","id":"CVE-2026-67213","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-29T14:42:00.426Z"}}]}}}