{"id":"GHSA-mwcw-c2x4-8c55","revision":"e160dd480daa480b981ade6ad3cf92da","records":[{"revision":"e160dd480daa480b981ade6ad3cf92da","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-mwcw-c2x4-8c55","aliases":["CVE-2024-55565"],"title":"Predictable results in nanoid generation when given non-integer values","description":"When nanoid is called with a fractional value, there were a number of undesirable effects:\n\n1. in browser and non-secure, the code infinite loops on while (size--)\n2. in node, the value of poolOffset becomes fractional, causing calls to nanoid to return zeroes until the pool is next filled\n3. if the first call in node is a fractional argument, the initial buffer allocation fails with an error\n\nVersion 3.3.8 and 5.0.9 are fixed.","state":0,"publishedAt":"2024-12-09T03:30:59+00:00","modifiedAt":"2026-09-10T03:50:21.6660948+00:00","affected":[{"ecosystem":"npm","name":"nanoid","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.0"},{"kind":"fixed","version":"5.0.9"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"nanoid","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.3.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2024-55565","https://github.com/ai/nanoid/pull/510","https://github.com/ai/nanoid","https://github.com/ai/nanoid/compare/3.3.7...3.3.8","https://github.com/ai/nanoid/releases/tag/5.0.9","https://lists.debian.org/debian-lts-announce/2024/12/msg00025.html","https://lists.debian.org/debian-lts-announce/2025/01/msg00006.html"],"sourceUrl":"https://github.com/advisories/GHSA-mwcw-c2x4-8c55","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-mwcw-c2x4-8c55","identifiers":["GHSA-mwcw-c2x4-8c55","CVE-2024-55565"]},"retained":false,"historicalAffected":[]}],"coverage":[]}