CVE-2024-55565
JavaScript vulnerability analysis and mitigation

Overview

The CVE-2024-55565 vulnerability affects nanoid (aka Nano ID) versions before 5.0.9, with version 3.3.8 also being a fixed version. The vulnerability was disclosed in December 2024 and involves the mishandling of non-integer values (NVD).

Technical details

The vulnerability occurs when nanoid is called with a fractional value, leading to multiple undesirable effects: in browser and non-secure environments, the code enters an infinite loop on 'while (size--)' condition; in Node.js, the poolOffset value becomes fractional, causing nanoid calls to return zeroes until the pool is refilled; and if the first call is made with a fractional argument, the initial buffer allocation fails with an error (GitHub PR).

Impact

The vulnerability can lead to infinite loops and incorrect ID generation, potentially causing application hangs and producing invalid or zero-value IDs. This could affect systems relying on nanoid for generating unique identifiers (GitHub PR).

Mitigation and workarounds

The vulnerability has been fixed in nanoid versions 5.0.9 and 3.3.8. Users should upgrade to either of these versions to resolve the issue. The fix includes implementing proper handling of non-integer values and preventing infinite loops (GitHub Release).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management