What’s Vulnerable › Vulnerabilities
CVE-2018-7166
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2018-08-21 · updated 2026-10-08
- Weakness: CWE-226
Description
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.
Affected products
- Node.js: from 10.0.0 before 10.9.0 — fixed in 10.9.0
How to fix
Upgrade to a fixed version: Node.js 10.9.0. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/errata/RHSA-2018:2553
- https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/
- https://access.redhat.com/errata/RHSA-2018:2553
- https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/
Get alerted when CVE-2018-7166 or the next vulnerability affects your stack