# CVE-2026-67213: nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom

> CVE-2026-67213: nanoid before 5.1.6 Infinite Loop via Zero Size in customAlphabet and customRandom. CVSS 5.9 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-67213
Last updated: 2026-10-23T23:10:00Z

- Published: 2026-07-29 13:32 UTC · Updated: 2026-10-23 23:10 UTC · Assigner: VulnCheck
- CVSS: 5.9 (CVSS 3.1) · Severity: Medium · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.33%, 26th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-835

## 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.

## Affected vendors and products

- nanoid\_project: nanoid

## Tracked companies

- [Confluence](https://rewindex.com/company/confluence.md)
- [Jira](https://rewindex.com/company/jira.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-67213)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-67213)
- [https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7](https://github.com/ai/nanoid/commit/cb3626d0f3342fdf179cd425fd9c4fbb92c7d0e7)
- [https://github.com/ai/nanoid/releases/tag/5.1.6](https://github.com/ai/nanoid/releases/tag/5.1.6)
- [https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom](https://www.vulncheck.com/advisories/nanoid-before-infinite-loop-via-zero-size-in-customalphabet-and-customrandom)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-67213 · Markdown: https://rewindex.com/cve/CVE-2026-67213.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-67213 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T02:15:32.645Z
