CVE-2024-55565
JSON

4.3medium

Predictable results in nanoid generation when given non-integer values

Severity
4.3medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.98% (higher than 61% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-mwcw-c2x4-8c55

Description

nanoid (aka Nano ID) before 5.0.9 mishandles non-integer values. 3.3.8 is also a fixed version.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
nanoid (npm)from 4.0.0 before 5.0.9, before 3.3.8GitHub Advisory Database

All scores

CISA-ADP4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
GitHub4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-835

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

nanoid (aka Nano ID) before 5.0.9 mishandles non-integer values. 3.3.8 is also a fixed version.

GitHub Advisory Database

When nanoid is called with a fractional value, there were a number of undesirable effects:

  1. in browser and non-secure, the code infinite loops on while (size--)
  2. in node, the value of poolOffset becomes fractional, causing calls to nanoid to return zeroes until the pool is next filled
  3. if the first call in node is a fractional argument, the initial buffer allocation fails with an error

Version 3.3.8 and 5.0.9 are fixed.

NVD (es)

nanoid (también conocido como Nano ID) anterior a la versión 5.0.9 maneja incorrectamente valores no enteros. La versión 3.3.8 también es una versión corregida.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-55565 changed 2025-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-mwcw-c2x4-8c55 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-55565 changed 2026-06-17Public domain