Predictable results in nanoid generation when given non-integer values
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
- if the first call in node is a fractional argument, the initial buffer allocation fails with an error
Version 3.3.8 and 5.0.9 are fixed.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka npm | nanoid | >= 4.0.0, < 5.0.9, < 3.3.8 | 5.0.9, 3.3.8 |
Odnośniki
- 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
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N- Słabość (CWE)
CWE-835- Platforma
- npm
- Paczka
nanoid- Ujawniono
- 09.12.2024
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-mwcw-c2x4-8c55 - CC BY 4.0
Historia podatności: nanoid
Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 5
- Pierwsza → ostatnia
- 01.2022 09.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 3
- Średnia 2
Ujawnienia w latach
- 2022: 1
- 2023: 0
- 2024: 1
- 2025: 0
- 2026: 3
-
Predictable results in nanoid generation when given non-integer values ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.