CVEfocus › CVE database › CVE-2018-7159

CVE-2018-7159

CVSS 5.3 MediumEPSS 3.5% (higher than 89% of CVEs)Published 2018-05-17Updated 2026-10-08Assigner: nodejs

The HTTP parser in all current versions of Node.js ignores spaces in the `Content-Length` header, allowing input such as `Content-Length: 1 2` to be interpreted as having a value of `12`. The HTTP specification does not allow for spaces in the `Content-Length` value and the Node.js HTTP parser has been brought into line on this particular difference. The security risk of this flaw to Node.js users is considered to be VERY LOW as it is difficult, and may be impossible, to craft an attack that makes use of this flaw in a way that could not already be achieved by supplying an incorrect value for `Content-Length`. Vulnerabilities may exist in user-code that make incorrect assumptions about the potential accuracy of this value compared to the actual length of the data supplied. Node.js users crafting lower-level HTTP utilities are advised to re-check the length of any input supplied after parsing is complete.

CWE-115

What to do

Fixed builds are available from Alpine, Debian, Red Hat: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

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

39Fixed
3Fix pending
15Not 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 26.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 25.10nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 18.04nodejsFix pendingUBUNTU-CVE-2018-7159
Ubuntu 16.04nodejsFix pendingUBUNTU-CVE-2018-7159
Ubuntu 14.04nodejsFix pendingUBUNTU-CVE-2018-7159
Debian 14nodejsFixed8.11.1~dfsg-2DEBIAN-CVE-2018-7159
Debian 13nodejsFixed8.11.1~dfsg-2DEBIAN-CVE-2018-7159
Debian 12nodejsFixed8.11.1~dfsg-2DEBIAN-CVE-2018-7159
Red Hat Enterprise Linux 8http-parserNot affected
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
Red Hat Enterprise Linux 7http-parserFixed0:2.7.1-8.el7RHSA-2019:2258
Red Hat Enterprise Linux 7http-parser-develFixed0:2.7.1-8.el7RHSA-2019:2258
Alpine Linux 3.24nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.24nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.23nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.23nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.22nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.22nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.21nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.21nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.20nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.20nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.19nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.19nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.18nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.18nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.17nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.17nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.16nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.16nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.15nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.15nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.14nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.14nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.13nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.13nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.12nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.12nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.11nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.11nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.10nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.10nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.9nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.9nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.8nodejsFixed8.11.0-r0ALPINE-CVE-2018-7159
Alpine Linux 3.8nodejs-currentFixed9.10.0-r0ALPINE-CVE-2018-7159

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.