PT-2024-36557 · Nanoid+1 · Nanoid+1

Myndzi

·

Published

2024-12-09

·

Updated

2026-06-04

·

CVE-2024-55565

CVSS v3.1

4.3

Medium

VectorAV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Name of the Vulnerable Software and Affected Versions nanoid versions prior to 5.0.9 nanoid version 3.3.8 is a fixed version, implying versions prior to 3.3.8 are also affected, but since 3.3.8 is mentioned as a fixed version, it indicates that versions before 3.3.8 and between 3.3.8 and 5.0.9 are vulnerable. However, to consolidate the information correctly based on the provided instructions: nanoid versions prior to 5.0.9
Description The issue concerns the mishandling of non-integer values by nanoid. When called with a fractional value, it can cause several undesirable effects, including infinite loops in browser and non-secure environments, and in Node, it can cause the poolOffset to become fractional, leading to nanoid returning zeroes until the pool is next filled. Additionally, if the first call in Node is a fractional argument, the initial buffer allocation fails with an error.
Recommendations For versions prior to 5.0.9, update to version 5.0.9 or later to resolve the issue. For versions prior to 3.3.8, update to version 3.3.8 or later to resolve the issue. As a temporary workaround, consider avoiding the use of fractional values with nanoid until a patch is applied.

Fix

Infinite Loop

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2024-55565
DLA-4003-1
DLA-4013-1
GHSA-MWCW-C2X4-8C55
OPENSUSE-SU-2025:14663-1
RHSA-2025:0340
RHSA-2026:2769

Affected Products

Debian
Nanoid