CVE-2024-55565: nanoid generation · Predictable Results
Affects nanoidSource GCVE Database
Not known to be exploited · CVSS 4.3 Medium : upgrade to 5.0.9 when convenient.
Data as of 31 Oct 2026, 01:26 UTC
- Patch
- Available – fixed in 5.0.9, 3.3.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 9 Dec 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade nanoid to 5.0.9; nanoid to 3.3.8.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmnanoid | Affected
| Fixed in
|
| npmnanoid | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade nanoid to version 3.3.8 or later if using the 3.x branch, or to version 5.0.9 or later if using the 5.x branch. These versions contain official fixes that address the fractional argument handling issues. No additional mitigation is required once updated.
Description
CVE-2024-55565 is a vulnerability in the nanoid library where passing fractional (non-integer) values to the nanoid function causes various undesirable behaviors. In browser environments, this can lead to an infinite loop. In Node.js, fractional values cause the internal poolOffset to become fractional, resulting in nanoid returning zeroes until the pool is refilled. Additionally, if the first call in Node.js uses a fractional argument, buffer allocation fails with an error. Versions 3.3.8 and 5.0.9 contain fixes for these issues.
References
- nvd.nist.gov/vuln/detail/CVE-2024-55565 (opens in a new tab)
- github.com/ai/nanoid/pull/510 (opens in a new tab)
- github.com/ai/nanoid (opens in a new tab)
- github.com/ai/nanoid/compare/3.3.7...3.3.8 (opens in a new tab)
- github.com/ai/nanoid/releases/tag/5.0.9 (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/12/msg00025.html (opens in a new tab)
- lists.debian.org/debian-lts-announce/2025/01/msg00006.html (opens in a new tab)