nanoid (npm)
A tiny (118 bytes), secure, URL-friendly, unique string ID generator for JavaScript
Advisories
18
Latest version
6.0.2
Released Oct 5, 2026
License
MIT
OpenSSF Scorecard
6.5 / 10
How to fix
Upgrading to 5.1.16 or later clears every advisory below that has a fix.
Upgrade commands
npm
npm install nanoid@6.0.2yarn
yarn add nanoid@6.0.2pnpm
pnpm add nanoid@6.0.2Known vulnerabilities
| Advisory | Severity | Affected | Fixed in |
|---|---|---|---|
| GHSA-xwg4-73v4-xw9w nanoid: Integer Overflow or Wraparound |
High EPSS 0.30% |
>= 4.0.0, < 5.1.11 | 5.1.11 |
| GHSA-xwg4-73v4-xw9w nanoid: Integer Overflow or Wraparound |
High EPSS 0.30% |
< 3.3.12 | 3.3.12 |
| GHSA-xwg4-73v4-xw9w nanoid: Integer Overflow or Wraparound |
High EPSS 0.30% |
>= 4.0.0, < 5.1.11 | 5.1.11 |
| GHSA-xwg4-73v4-xw9w nanoid: Integer Overflow or Wraparound |
High EPSS 0.30% |
< 3.3.12 | 3.3.12 |
| GHSA-28wg-ghj8-5hjv nanoid: non-secure generators can loop indefinitely with negative size |
High EPSS 0.33% |
>= 4.0.0, < 5.1.16 | 5.1.16 |
| GHSA-28wg-ghj8-5hjv nanoid: non-secure generators can loop indefinitely with negative size |
High EPSS 0.33% |
>= 4.0.0, < 5.1.16 | 5.1.16 |
| GHSA-28wg-ghj8-5hjv nanoid: non-secure generators can loop indefinitely with negative size |
High EPSS 0.33% |
< 3.3.16 | 3.3.16 |
| GHSA-28wg-ghj8-5hjv nanoid: non-secure generators can loop indefinitely with negative size |
High EPSS 0.33% |
< 3.3.16 | 3.3.16 |
| GHSA-2v37-7h3g-55p8 nanoid: custom generators can loop indefinitely when size is zero |
High EPSS 0.33% |
>= 4.0.0, < 5.1.6 | 5.1.6 |
| GHSA-2v37-7h3g-55p8 nanoid: custom generators can loop indefinitely when size is zero |
High EPSS 0.33% |
< 3.3.18 | 3.3.18 |
| GHSA-2v37-7h3g-55p8 nanoid: custom generators can loop indefinitely when size is zero |
High EPSS 0.33% |
< 3.3.18 | 3.3.18 |
| GHSA-2v37-7h3g-55p8 nanoid: custom generators can loop indefinitely when size is zero |
High EPSS 0.33% |
>= 4.0.0, < 5.1.6 | 5.1.6 |
| GHSA-mwcw-c2x4-8c55 Predictable results in nanoid generation when given non-integer values |
Medium EPSS 0.66% |
< 3.3.8 | 3.3.8 |
| GHSA-mwcw-c2x4-8c55 Predictable results in nanoid generation when given non-integer values |
Medium EPSS 0.66% |
< 3.3.8 | 3.3.8 |
| GHSA-mwcw-c2x4-8c55 Predictable results in nanoid generation when given non-integer values |
Medium EPSS 0.66% |
>= 4.0.0, < 5.0.9 | 5.0.9 |
| GHSA-mwcw-c2x4-8c55 Predictable results in nanoid generation when given non-integer values |
Medium EPSS 0.66% |
>= 4.0.0, < 5.0.9 | 5.0.9 |
| GHSA-qrpm-p2h7-hrv2 Exposure of Sensitive Information to an Unauthorized Actor in nanoid |
Medium EPSS 0.44% |
>= 3.0.0, < 3.1.31 | 3.1.31 |
| GHSA-qrpm-p2h7-hrv2 Exposure of Sensitive Information to an Unauthorized Actor in nanoid |
Medium EPSS 0.44% |
>= 3.0.0, < 3.1.31 | 3.1.31 |
Source: git+https://github.com/ai/nanoid.git
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor