nanoid: Integer Overflow or Wraparound
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-73086
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 15:55 UTC · Revision 1
Source evidence
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.
osv:CVE-2026-73086
Complete source record
{
"id": "a12523a781caf3c883ecf083467003cc047a41de7624c873079fd7f73d4bbbc3",
"url": "https://osv.dev/vulnerability/CVE-2026-73086",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "nanoid: Integer Overflow or Wraparound",
"summary": "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.",
"evidence": "osv:CVE-2026-73086",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-73086",
"aliases": [
"CVE-2026-73086",
"GHSA-xwg4-73v4-xw9w"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ai/nanoid",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "aa9c399f6915fb8aaf957ac9290321be932ac252"
},
{
"introduced": "fd80ce3f462d3309c31d07dc3b3ec2f3e0a0fc9f"
},
{
"fixed": "5423cf56499c1ea33ea4bd9fbaab1723083cb659"
},
{
"fixed": "7087969281cab8ba8ae3babf1894e819068b3bb4"
},
{
"fixed": "821dfed7b5db7f88e92f56c60eef32c8135077c3"
},
{
"fixed": "b0036ed60dc9facd7f1191a50dfb3076500202ac"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "3.3.12"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "4.0.0"
},
{
"fixed": "5.1.11"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "7087969281cab8ba8ae3babf1894e819068b3bb4"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "821dfed7b5db7f88e92f56c60eef32c8135077c3"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "b0036ed60dc9facd7f1191a50dfb3076500202ac"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "aa9c399f6915fb8aaf957ac9290321be932ac252"
}
],
"source": "REFERENCES_TAG",
"original_tag": "3.3.12"
},
{
"range": [
{
"fixed": "5423cf56499c1ea33ea4bd9fbaab1723083cb659"
}
],
"source": "REFERENCES_TAG",
"original_tag": "5.1.11"
}
]
}
}
],
"versions": [
"5.1.10",
"5.1.9",
"5.1.8",
"5.1.7",
"5.1.6",
"5.1.5",
"3.3.11",
"3.3.10",
"5.1.4",
"3.3.9",
"5.1.3",
"3.3.8",
"5.1.2",
"5.1.1",
"5.1.0",
"5.0.9",
"3.3.7",
"5.0.8",
"5.0.7",
"5.0.6",
"5.0.5",
"5.0.4",
"5.0.3",
"3.3.6",
"5.0.2",
"5.0.1",
"5.0.0",
"4.0.2",
"3.3.5",
"4.0.1",
"4.0.0",
"3.3.4",
"3.3.3",
"3.3.2",
"3.3.1",
"3.3.0",
"3.2.0",
"3.1.32",
"3.1.31",
"3.1.30",
"3.1.29",
"3.1.28",
"3.1.27",
"3.1.26",
"3.1.25",
"3.1.24",
"3.1.23",
"3.1.22",
"3.1.21",
"3.1.20",
"3.1.19",
"3.1.18",
"3.1.17",
"3.1.16",
"3.1.15",
"3.1.14",
"3.1.13",
"3.1.12",
"3.1.11",
"3.1.10",
"3.1.9",
"3.1.8",
"3.1.7",
"3.1.6",
"3.1.5",
"3.1.4",
"3.1.2",
"3.1.1",
"3.1.0",
"3.0.2",
"3.0.1",
"3.0.0",
"2.1.11",
"2.1.10",
"2.1.9",
"2.1.8",
"2.1.7",
"2.1.6",
"2.1.5",
"2.1.4",
"2.1.3",
"2.1.2",
"2.1.1",
"2.1.0",
"2.0.4",
"2.0.3",
"2.0.2",
"2.0.1",
"2.0.0",
"1.3.4",
"1.3.3",
"1.3.2",
"1.3.1",
"1.3.0",
"1.2.6",
"1.2.5",
"1.2.4",
"1.2.3",
"1.2.2",
"1.2.1",
"1.2.0",
"1.1.1",
"1.1.0",
"1.0.7",
"1.0.6",
"1.0.5",
"1.0.4",
"1.0.3",
"1.0.2",
"1.0.1",
"1.0.0",
"0.2.2",
"0.2.1",
"0.2.0",
"0.1.1",
"0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-73086.json"
}
}
],
"modified": "2026-10-28T02:30:36.823930202Z",
"provider": "osv",
"references": [
"https://github.com/ai/nanoid/releases/tag/3.3.12",
"https://github.com/ai/nanoid/releases/tag/5.1.11",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73086.json",
"https://github.com/ai/nanoid/security/advisories/GHSA-xwg4-73v4-xw9w",
"https://nvd.nist.gov/vuln/detail/CVE-2026-73086",
"https://github.com/ai/nanoid/commit/7087969281cab8ba8ae3babf1894e819068b3bb4",
"https://github.com/ai/nanoid/commit/821dfed7b5db7f88e92f56c60eef32c8135077c3",
"https://github.com/ai/nanoid/commit/b0036ed60dc9facd7f1191a50dfb3076500202ac"
],
"provider_metadata": {
"cwe_ids": [
"CWE-190"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73086.json"
}
},
"related_cves": [
{
"value": "CVE-2026-73086",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504346,
"published_at": "2026-08-11T16:46:23.024+00:00"
}