Skip to content
OpenAdvisories
Unscored CVE-2018-7166 EUVD-2018-18908GHSA-6v28-c2x2-8p46

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 …

Published Aug 21, 2018 · Updated Oct 8, 2026 · Assigned by nodejs

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

VendorProductAffectedFixed
The Node.js Project Node.js All versions of Node.js 10 prior to 10.9.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
RHEL 3 rh-nodejs10-nodejs +2 10.10.0-3.el7 RHBA-2019:0772
RHEL 3 rh-nodejs10-npm 6.4.1-10.10.0.3.el7 RHBA-2019:0772
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Openshift Application Runtimes 1 npm 1:6.2.0-1.10.9.0.1.el7 RHSA-2018:2553
Red Hat Openshift Application Runtimes 1 rhoar-nodejs +1 1:10.9.0-1.el7 RHSA-2018:2553

Advisories 2

References