{"id":"CVE-2024-55565","aliases":["CVE-2024-55565","GHSA-mwcw-c2x4-8c55"],"related":[],"kind":"vulnerability","state":"published","title":"Predictable results in nanoid generation when given non-integer values","summary":"nanoid (aka Nano ID) before 5.0.9 mishandles non-integer values. 3.3.8 is also a fixed version.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"nanoid (aka Nano ID) before 5.0.9 mishandles non-integer values. 3.3.8 is also a fixed version.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-12-09T00:00:00.000Z","modified":"2026-09-10T03:50:21.666Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"5.0.9"}],"ecosystem":"npm","package":"nanoid","purl":"pkg:npm/nanoid","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.3.8"}],"ecosystem":"npm","package":"nanoid","purl":"pkg:npm/nanoid","source":"ghsa"}],"references":[{"url":"https://github.com/ai/nanoid/pull/510","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ai/nanoid/releases/tag/5.0.9","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ai/nanoid/compare/3.3.7...3.3.8","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00006.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00025.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-55565","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ai/nanoid","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-12-12T17:19:45.458Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-55565","url":"https://www.cve.org/CVERecord?id=CVE-2024-55565","licence":"CVE Terms of Use","modified":"2025-11-03T22:32:41.164Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mwcw-c2x4-8c55","url":"https://github.com/advisories/GHSA-mwcw-c2x4-8c55","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:21.666Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-55565","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-55565","licence":"Public domain","modified":"2026-06-17T08:11:15.037Z"}],"updatedAt":"2026-11-25T22:58:49.827Z","epss":{"score":0.00982,"percentile":0.61137,"date":"2026-11-30T12:00:22.000Z"}}