CVEfocus › CVE database › CVE-2018-7166

CVE-2018-7166

EPSS 3.3% (higher than 89% of CVEs)Published 2018-08-21Updated 2026-10-08Assigner: nodejs

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.

CWE-226

What to do

None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

12Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Red Hat Enterprise Linux 8nodejsNot affected
Red Hat Enterprise Linux 8nodejs-develNot affected
Red Hat Enterprise Linux 8nodejs-docsNot affected
Red Hat Enterprise Linux 8nodejs-full-i18nNot affected
Red Hat Enterprise Linux 8nodejs-libsNot affected
Red Hat Enterprise Linux 8nodejs-nodemonNot affected
Red Hat Enterprise Linux 8nodejs-packagingNot affected
Red Hat Enterprise Linux 8nodejs-packaging-bundlerNot affected
Red Hat Enterprise Linux 8npmNot affected
Red Hat Enterprise Linux 8v8-12.4-develNot affected
Red Hat Enterprise Linux 8v8-13.6-develNot affected

What the vendor says

As published in the CVE record by nodejs, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.