Skip to content
OpenAdvisories

Description

nanoid (Nano ID) before 5.1.6 contains an infinite loop in the customAlphabet and customRandom functions. When these functions are configured with a size of 0, the internal generation loop never satisfies its exit condition and spins indefinitely, hanging the calling thread. An application that passes an unvalidated, attacker-controlled size of 0 to these functions is exposed to a denial-of-service condition.

Affected products

VendorProductAffectedFixed
nanoid_project nanoid 3.0.0 – < 3.3.17, 5.0.0 – < 5.1.6 3.3.17

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-mocha 9.1.4+ds1+~cs28.2.8-1 —
Debian 14 node-postcss 8.5.8+~cs9.3.30-1 —
Debian 13 node-mocha 9.1.4+ds1+~cs28.2.8-1 —
Debian 13 node-postcss No fix yet —
Debian 12 node-mocha 9.1.4+ds1+~cs28.2.8-1 —
Debian 12 node-postcss No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS node-postcss No fix yet —
Ubuntu 22.04 LTS node-postcss No fix yet —
Ubuntu 20.04 LTS node-postcss No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 grafana12.4 12.4.6-0.2.hum1 RHSA-2026:47619
Red Hat Hardened Images 1 grafana13.1 13.1.1-0.3.hum1 RHSA-2026:48241
Red Hat Hardened Images 1 jaeger 2.20.0-0.6.hum1 RHSA-2026:47614

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling jitsucom-jitsu-console 2.11.0-r32 —
Wolfi rolling json-server 0.17.4-r11 —
Wolfi rolling jupyter-base-notebook 7.6.3-r2 —
Wolfi rolling langfuse-3 +1 3.225.1-r1 —
Wolfi rolling langfuse-3-compat 3.225.7-r6 —
Wolfi rolling nextcloud-server-33 33.0.7-r3 —
Wolfi rolling renovate 44.23.3-r1 —
Wolfi rolling saf 1.6.0-r4 —
Wolfi rolling vite 8.2.1-r1 —
Wolfi rolling vitess-23 23.0.5-r8 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm nanoid < 3.3.18 3.3.18 GHSA-2v37-7h3g-55p8
npm nanoid >= 4.0.0, < 5.1.6 5.1.6 GHSA-2v37-7h3g-55p8

Advisories 6

References