npm package

nanoid 3.3.7 vulnerabilities, and the version that fixes all of them

nanoid 3.3.7 has 4 known vulnerabilities (3 rated high or critical); 3.3.18 fixes all of them.

npm (opens in a new tab) describes it as “A tiny (117 bytes), secure URL-friendly unique string ID generator”

Known vulnerabilities
4
3 rated high or critical
Released
Nov 6, 2023
Latest is 6.0.2
Downloads last week
4.8M
2% of nanoid downloads
Licence
MIT
OpenSSF Scorecard
6.5/10
ai/nanoid (opens in a new tab)
Dependencies
None
Resolved by deps.dev

What to upgrade to

3.3.18 is the closest release with no known vulnerabilities.

  • 3.3.18Upgrade to this

    Fixes all 4 known vulnerabilities. Released Aug 7, 2026.

    No known vulnerabilities
  • 3.3.20

    Newest 3.x release. Released Oct 5, 2026.

    No known vulnerabilities
  • 6.0.2

    Latest release. Released Oct 5, 2026.

    No known vulnerabilities

3.3.18 came out on Aug 7, 2026. A coding agent trained before then doesn’t know it exists, so it may suggest an older release. AI knowledge cutoff dates

Hand the fix to your coding agent

One task with the upgrade, the file to change and why. Paste it into Claude Code, Cursor or Codex.

Findings

Every advisory for nanoid 3.3.7

Known exploited first (CISA KEV), then by how likely they are to be exploited (FIRST EPSS), then by severity. Each id links to its OSV.dev record.

  1. WarningCVE-2024-55565 on OSV.dev (opens in a new tab)GHSA-mwcw-c2x4-8c55EPSS: top 50%

    Predictable results in nanoid generation when given non-integer values

    Fixed in 3.3.8. Published Dec 9, 2024.

  2. CriticalCVE-2026-67213 on OSV.dev (opens in a new tab)GHSA-2v37-7h3g-55p8EPSS: top 54%

    nanoid: custom generators can loop indefinitely when size is zero

    Fixed in 3.3.18. Published Jul 29, 2026.

  3. CriticalCVE-2026-67214 on OSV.dev (opens in a new tab)GHSA-28wg-ghj8-5hjvEPSS: top 76%

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

    Fixed in 3.3.16. Published Jul 29, 2026.

  4. CriticalCVE-2026-73086 on OSV.dev (opens in a new tab)GHSA-xwg4-73v4-xw9wEPSS: top 80%

    nanoid: Integer Overflow or Wraparound

    Fixed in 3.3.12. Published Sep 1, 2026.

Who is still on a vulnerable nanoid

42% of last week’s 273.5M nanoid downloads went to versions with known vulnerabilities.

From npm’s per-version download counts for the last 7 days, each version checked against OSV.dev. The versions checked cover over 99% of downloads.

Is nanoid the only one?

Paste a public GitHub repo or drop your package.json and see every vulnerable, end-of-life or deprecated dependency, with one fix task. Free, no sign-up.

Check your whole repo

How this page is checked

StackPrism asks OSV.dev which advisories affect exactly nanoid 3.3.7, merges duplicates filed under several ids, and ranks them with CISA’s Known Exploited Vulnerabilities list and FIRST EPSS. Release dates and deprecation come from deps.dev and npm. No AI writes this page: every sentence comes from that data, refreshed every few hours.

Last checked against npm, OSV.dev, deps.dev, CISA KEV and FIRST EPSS.