Skip to main content
VulnerabilityPublished Updated

CVE-2024-55565: nanoid generation · Predictable Results

Affects nanoidSource GCVE Database

0
Compare
Authoritative record:CVE-2024-55565· Medium 4.3

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

CVSS 3.1 base score
4.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 9 Dec 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
npmnanoidAffected
  • >=4.0.0 <5.0.9
Fixed in
  • 5.0.9
npmnanoidAffected
  • <3.3.8
Fixed in
  • 3.3.8

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

Community reviews

Loading reviews…