Medium
Security advisory
The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-23566
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:40 UTC · Revision 1
Source evidence
The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.
osv:CVE-2021-23566
Complete source record
{
"id": "3c07ec8f20e89e79d5271d34ad87f515960dd603f1aed94fbd17a16492d8d0e9",
"url": "https://osv.dev/vulnerability/CVE-2021-23566",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-23566",
"summary": "The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.",
"evidence": "osv:CVE-2021-23566",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-23566",
"aliases": [
"CVE-2021-23566",
"GHSA-qrpm-p2h7-hrv2"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ai/nanoid",
"type": "GIT",
"events": [
{
"introduced": "7b45b890ce9cba85c8dc08fdb7ad401b966ed067"
},
{
"fixed": "07fdfa6618e2668ce51b2554ee3e1a3ad87b0492"
},
{
"fixed": "2b7bd9332bc49b6330c7ddb08e5c661833db2575"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nanoid_project:nanoid:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.1.31"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "2b7bd9332bc49b6330c7ddb08e5c661833db2575"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"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"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23566.json"
}
}
],
"modified": "2026-10-20T10:54:32.903533284Z",
"provider": "osv",
"references": [
"https://lists.debian.org/debian-lts-announce/2024/12/msg00025.html",
"https://lists.debian.org/debian-lts-announce/2025/01/msg00006.html",
"https://github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575",
"https://github.com/ai/nanoid/pull/328",
"https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444",
"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550",
"https://snyk.io/vuln/SNYK-JS-NANOID-2332193"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-23566",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 385550,
"published_at": "2022-01-14T20:15:10.093+00:00"
}