nanoid vulnerabilities

A tiny (117 bytes), secure URL-friendly unique string ID generator

Registry
npm
Latest
6.0.2
License
MIT

5 known advisories

The latest version, 6.0.2, is not affected by any of them. Projects on older versions may be.

Update to the latest version:npm install nanoid@6.0.2

Security advisories for nanoid

  • HighGHSA-xwg4-73v4-xw9w1 Sept 2026

    nanoid: Integer Overflow or Wraparound

    Affected
    <3.3.12 · >=4.0.0 <5.1.11
    Fixed in
    3.3.12, 5.1.11
  • HighGHSA-28wg-ghj8-5hjv29 Jul 2026

    nanoid: non-secure generators can loop indefinitely with negative size

    Affected
    <3.3.16 · >=4.0.0 <5.1.16
    Fixed in
    3.3.16, 5.1.16
  • HighGHSA-2v37-7h3g-55p829 Jul 2026

    nanoid: custom generators can loop indefinitely when size is zero

    Affected
    <3.3.18 · >=4.0.0 <5.1.6
    Fixed in
    3.3.18, 5.1.6
  • MediumGHSA-mwcw-c2x4-8c559 Dec 2024

    Predictable results in nanoid generation when given non-integer values

    Affected
    >=4.0.0 <5.0.9 · <3.3.8
    Fixed in
    3.3.8, 5.0.9
  • MediumGHSA-qrpm-p2h7-hrv221 Jan 2022

    Exposure of Sensitive Information to an Unauthorized Actor in nanoid

    Affected
    >=3.0.0 <3.1.31
    Fixed in
    3.1.31

Which of your client projects still run an old nanoid?

NPMscan reads the package-lock.json, yarn.lock and pnpm-lock.yaml in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other npm packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the npm registry.