Description
When nanoid is called with a fractional value, there were a number of undesirable effects:
- in browser and non-secure, the code infinite loops on while (size–)
- in node, the value of poolOffset becomes fractional, causing calls to nanoid to return zeroes until the pool is next filled 3.
Recommendation
Update the nanoid package to the latest compatible version. Followings are version details:
Affected version(s): **< 3.3.8 >= 4.0.0, < 5.0.9** Patched version(s): **3.3.8 5.0.9**
References
Could your website be exposed too?
SmartScanner can check your website for Predictable results in nanoid generation when given non-integer values and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Vue I18n: `escapeParameter` does not escape named values when the same call also passes a list - @intlify/core-base - CVE-2026-118256
- Generation of Error Message Containing Sensitive Information in zsa - CVE-2024-37162
- agent-js: Insecure Key Generation in `Ed25519KeyIdentity.generate` - @dfinity/identity - CVE-2024-1631
- Vue I18n: `escapeParameter` does not escape named values when the same call also passes a list - @intlify/core - CVE-2026-118256
You might also like:
See something that needs correcting? Let us knowUpdated November 04, 2025


