node-mocha, node-postcss — 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
- node-mocha, node-postcss
- Affected versions
- 1.20.1-1, 1.20.1-2, 1.20.1-7, 10.2.0+ds1+~cs29.5.1-1, 10.4.0+ds1+~cs33.1.8-1, 10.7.2+ds1+~cs33.1.11-2, 11.7.2+ds1+~cs36.3.14-2build1, 11.7.5+ds1+~cs36.3.14-2, 11.7.7+ds1+~cs36.3.16-1, 11.8.0+ds1+~cs36.4.12-1, 11.8.0+ds1+~cs36.4.12-2, 4.1.0+ds3-5, 6.0.23-1, 6.0.23-3, 7.0.1+ds1-2, 8.2.1+ds1+~cs29.4.27-3, 8.2.1+~cs5.3.23-8, 8.4.20+~cs8.0.23-1, 8.4.31+~cs8.0.26-1, 8.4.49+~cs9.2.32-1, 8.4.5+~cs7.1.51-2, 8.4.6+~cs7.3.21-1, 8.5.15+~cs9.3.34-1, 8.5.15+~cs9.3.38-1, 8.5.15+~cs9.3.39-1build1, 8.5.25+~cs10.2.23-1, 8.5.26+~cs10.2.24-1, 8.5.6+~cs9.3.28-1, 8.5.8+~cs9.3.30-1, 9.1.3+ds1+~cs31.2.38-1, 9.2.0+ds1+~cs28.3.8-1, 9.2.1+ds1+~cs28.3.8-1
- Fixed versions
- Not specified
- CVEs
- CVE-2021-23566
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:35 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:UBUNTU-CVE-2021-23566
node-mocha
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-postcss
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-postcss
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-postcss
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-postcss
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-postcss
Fixed versions: Not specified
node-mocha
Fixed versions: Not specified
node-postcss
Fixed versions: Not specified
Complete source record
{
"id": "64c19e4ac4a447c6ac47de73ce6b46fb61bb462436f2251003e491da16762c69",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-23566",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-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:UBUNTU-CVE-2021-23566",
"products": [
{
"name": {
"value": "node-mocha",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.20.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.20.1-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.20.1-7",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.1.0+ds3-5",
"evidence": "/affected/2/versions"
},
{
"value": "7.0.1+ds1-2",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "node-postcss",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "6.0.23-1",
"evidence": "/affected/3/versions"
},
{
"value": "6.0.23-3",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8.2.1+ds1+~cs29.4.27-3",
"evidence": "/affected/4/versions"
},
{
"value": "9.1.3+ds1+~cs31.2.38-1",
"evidence": "/affected/4/versions"
},
{
"value": "9.2.0+ds1+~cs28.3.8-1",
"evidence": "/affected/4/versions"
},
{
"value": "9.2.1+ds1+~cs28.3.8-1",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "node-postcss",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8.2.1+~cs5.3.23-8",
"evidence": "/affected/5/versions"
},
{
"value": "8.4.5+~cs7.1.51-2",
"evidence": "/affected/5/versions"
},
{
"value": "8.4.6+~cs7.3.21-1",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "10.2.0+ds1+~cs29.5.1-1",
"evidence": "/affected/6/versions"
},
{
"value": "10.4.0+ds1+~cs33.1.8-1",
"evidence": "/affected/6/versions"
}
]
},
{
"name": {
"value": "node-postcss",
"evidence": "/affected/7/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8.4.20+~cs8.0.23-1",
"evidence": "/affected/7/versions"
},
{
"value": "8.4.31+~cs8.0.26-1",
"evidence": "/affected/7/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/8/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "10.7.2+ds1+~cs33.1.11-2",
"evidence": "/affected/8/versions"
}
]
},
{
"name": {
"value": "node-postcss",
"evidence": "/affected/9/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8.4.49+~cs9.2.32-1",
"evidence": "/affected/9/versions"
},
{
"value": "8.5.6+~cs9.3.28-1",
"evidence": "/affected/9/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/10/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "11.7.5+ds1+~cs36.3.14-2",
"evidence": "/affected/10/versions"
},
{
"value": "11.7.7+ds1+~cs36.3.16-1",
"evidence": "/affected/10/versions"
},
{
"value": "11.8.0+ds1+~cs36.4.12-1",
"evidence": "/affected/10/versions"
},
{
"value": "11.8.0+ds1+~cs36.4.12-2",
"evidence": "/affected/10/versions"
}
]
},
{
"name": {
"value": "node-postcss",
"evidence": "/affected/11/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8.5.8+~cs9.3.30-1",
"evidence": "/affected/11/versions"
},
{
"value": "8.5.15+~cs9.3.34-1",
"evidence": "/affected/11/versions"
},
{
"value": "8.5.15+~cs9.3.38-1",
"evidence": "/affected/11/versions"
},
{
"value": "8.5.15+~cs9.3.39-1build1",
"evidence": "/affected/11/versions"
},
{
"value": "8.5.25+~cs10.2.23-1",
"evidence": "/affected/11/versions"
},
{
"value": "8.5.26+~cs10.2.24-1",
"evidence": "/affected/11/versions"
}
]
},
{
"name": {
"value": "node-mocha",
"evidence": "/affected/12/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "10.7.2+ds1+~cs33.1.11-2",
"evidence": "/affected/12/versions"
},
{
"value": "11.7.2+ds1+~cs36.3.14-2build1",
"evidence": "/affected/12/versions"
},
{
"value": "11.7.5+ds1+~cs36.3.14-2",
"evidence": "/affected/12/versions"
}
]
},
{
"name": {
"value": "node-postcss",
"evidence": "/affected/13/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8.5.6+~cs9.3.28-1",
"evidence": "/affected/13/versions"
},
{
"value": "8.5.8+~cs9.3.30-1",
"evidence": "/affected/13/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2021-23566",
"aliases": [
"UBUNTU-CVE-2021-23566"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=xenial",
"ecosystem": "Ubuntu:16.04:LTS"
},
"versions": [
"1.20.1-1",
"1.20.1-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-mocha",
"binary_version": "1.20.1-2"
},
{
"binary_name": "mocha",
"binary_version": "1.20.1-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=bionic",
"ecosystem": "Ubuntu:18.04:LTS"
},
"versions": [
"1.20.1-7"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-mocha",
"binary_version": "1.20.1-7"
},
{
"binary_name": "mocha",
"binary_version": "1.20.1-7"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"4.1.0+ds3-5",
"7.0.1+ds1-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "mocha",
"binary_version": "7.0.1+ds1-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-postcss",
"purl": "pkg:deb/ubuntu/node-postcss?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"6.0.23-1",
"6.0.23-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-postcss",
"binary_version": "6.0.23-3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"8.2.1+ds1+~cs29.4.27-3",
"9.1.3+ds1+~cs31.2.38-1",
"9.2.0+ds1+~cs28.3.8-1",
"9.2.1+ds1+~cs28.3.8-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "mocha",
"binary_version": "9.2.1+ds1+~cs28.3.8-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-postcss",
"purl": "pkg:deb/ubuntu/node-postcss?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"8.2.1+~cs5.3.23-8",
"8.4.5+~cs7.1.51-2",
"8.4.6+~cs7.3.21-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-postcss",
"binary_version": "8.4.6+~cs7.3.21-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"10.2.0+ds1+~cs29.5.1-1",
"10.4.0+ds1+~cs33.1.8-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "mocha",
"binary_version": "10.4.0+ds1+~cs33.1.8-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-postcss",
"purl": "pkg:deb/ubuntu/node-postcss?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"8.4.20+~cs8.0.23-1",
"8.4.31+~cs8.0.26-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-postcss",
"binary_version": "8.4.31+~cs8.0.26-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"10.7.2+ds1+~cs33.1.11-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "mocha",
"binary_version": "10.7.2+ds1+~cs33.1.11-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-postcss",
"purl": "pkg:deb/ubuntu/node-postcss?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"8.4.49+~cs9.2.32-1",
"8.5.6+~cs9.3.28-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-postcss",
"binary_version": "8.5.6+~cs9.3.28-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"11.7.5+ds1+~cs36.3.14-2",
"11.7.7+ds1+~cs36.3.16-1",
"11.8.0+ds1+~cs36.4.12-1",
"11.8.0+ds1+~cs36.4.12-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "mocha",
"binary_version": "11.8.0+ds1+~cs36.4.12-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-postcss",
"purl": "pkg:deb/ubuntu/node-postcss?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"8.5.8+~cs9.3.30-1",
"8.5.15+~cs9.3.34-1",
"8.5.15+~cs9.3.38-1",
"8.5.15+~cs9.3.39-1build1",
"8.5.25+~cs10.2.23-1",
"8.5.26+~cs10.2.24-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-postcss",
"binary_version": "8.5.26+~cs10.2.24-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-mocha",
"purl": "pkg:deb/ubuntu/node-mocha?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"10.7.2+ds1+~cs33.1.11-2",
"11.7.2+ds1+~cs36.3.14-2build1",
"11.7.5+ds1+~cs36.3.14-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "mocha",
"binary_version": "11.7.5+ds1+~cs36.3.14-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-postcss",
"purl": "pkg:deb/ubuntu/node-postcss?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"8.5.6+~cs9.3.28-1",
"8.5.8+~cs9.3.30-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-23566.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-postcss",
"binary_version": "8.5.8+~cs9.3.30-1"
}
]
}
}
],
"modified": "2026-10-17T12:57:11.798178980Z",
"provider": "osv",
"upstream": [
"CVE-2021-23566"
],
"references": [
"https://ubuntu.com/security/CVE-2021-23566",
"https://github.com/ai/nanoid/pull/328",
"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550",
"https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444",
"https://snyk.io/vuln/SNYK-JS-NANOID-2332193",
"https://github.com/ai/nanoid/commit/2b7bd9332bc49b6330c7ddb08e5c661833db2575",
"https://www.cve.org/CVERecord?id=CVE-2021-23566"
]
},
"related_cves": [
{
"value": "CVE-2021-23566",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/1/score"
},
"source_id": "core-osv",
"document_id": 356877,
"published_at": "2022-01-14T20:15:00+00:00"
}