Security advisory
In all versions of Node.js 10 prior to 10.9.0, an argument processing flaw can cause `Buffer.alloc()` to return uninitialized memory. This method is intended to be safe and only return initialized, or cleared, memory. The third argument specifying `encoding` can be passed as a number, this is misinterpreted by `Buffer's` internal "fill" method as the `start` to a fill operation. This flaw may be abused where `Buffer.alloc()` arguments are derived from user input to return uncleared memory blocks that may contain sensitive information.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2018-7166
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 07:12 UTC · Revision 1
Source evidence
In all versions of Node.js 10 prior to 10.9.0, an argument processing flaw can cause `Buffer.alloc()` to return uninitialized memory. This method is intended to be safe and only return initialized, or cleared, memory. The third argument specifying `encoding` can be passed as a number, this is misinterpreted by `Buffer's` internal "fill" method as the `start` to a fill operation. This flaw may be abused where `Buffer.alloc()` arguments are derived from user input to return uncleared memory blocks that may contain sensitive information.
osv:CVE-2018-7166
Complete source record
{
"id": "7581c021cb04a670b8f398ff2e6acec2f53eae236c3c7a1b114c8d05b355c0aa",
"url": "https://osv.dev/vulnerability/CVE-2018-7166",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2018-7166",
"summary": "In all versions of Node.js 10 prior to 10.9.0, an argument processing flaw can cause `Buffer.alloc()` to return uninitialized memory. This method is intended to be safe and only return initialized, or cleared, memory. The third argument specifying `encoding` can be passed as a number, this is misinterpreted by `Buffer's` internal \"fill\" method as the `start` to a fill operation. This flaw may be abused where `Buffer.alloc()` arguments are derived from user input to return uncleared memory blocks that may contain sensitive information.",
"evidence": "osv:CVE-2018-7166",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2018-7166",
"aliases": [
"CVE-2018-7166"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/nodejs/node",
"type": "GIT",
"events": [
{
"introduced": "cf41627411886000429bde058a6594fb7f6d6d47"
},
{
"fixed": "03b825811ed4af0addcdf6e75bacb3dc1c4c5940"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "10.0.0"
},
{
"fixed": "10.9.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v10.8.0",
"v10.7.0",
"v10.6.0",
"v10.5.0",
"v10.4.1",
"v10.4.0",
"v10.3.0",
"v10.2.1",
"v10.2.0",
"v10.1.0",
"v10.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-7166.json"
}
}
],
"modified": "2026-10-24T10:30:50.142826200Z",
"provider": "osv",
"references": [
"https://access.redhat.com/errata/RHSA-2018:2553",
"https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2018-7166",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 437157,
"published_at": "2018-08-21T12:29:00.32+00:00"
}