Skip to content
OpenAdvisories
Unscored CVE-2018-7159 EUVD-2018-18902GHSA-87vg-5pwm-8x6w

The HTTP parser in all current versions of Node.js ignores spaces in the `Content-Length` header, allowing input such as `Content-Length: 1…

Published May 17, 2018 · Updated Oct 8, 2026 · Assigned by nodejs

Description

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.

Affected products

VendorProductAffectedFixed
The Node.js Project Node.js 4.x, 6.x, 8.x, 9.x —

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
Debian 14 nodejs 8.11.1~dfsg-2 —
Debian 13 nodejs 8.11.1~dfsg-2 —
Debian 12 nodejs 8.11.1~dfsg-2 —
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS nodejs No fix yet —
Ubuntu Pro 16.04 LTS nodejs No fix yet —
Ubuntu Pro 14.04 LTS nodejs No fix yet —
ReleasePackageFixed inAdvisory
RHEL 7 http-parser +1 2.7.1-8.el7 RHSA-2019:2258
RHEL 3 rh-nodejs8-nodejs +2 8.11.4-1.el7 RHSA-2018:2949
RHEL 3 rh-nodejs8-npm 5.6.0-8.11.4.1.el7 RHSA-2018:2949
ReleasePackageFixed inAdvisory
SLES 12 nodejs4 4.9.1-15.11.1 SUSE-SU-2018:0952-1
SLES 12 nodejs6 6.14.1-11.12.1 SUSE-SU-2018:1183-1
SLES 11 SP4 MozillaFirefox 68.2.0-78.51.4 SUSE-SU-2019:14246-1
SLES 11 SP4 MozillaFirefox-branding-SLED 68-21.9.8 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-atk 2.26.1-2.8.4 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-cairo 1.15.10-2.13.4 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-gdk-pixbuf 2.36.11-2.8.4 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-glib2 2.54.3-2.14.7 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-gtk3 3.10.9-2.15.3 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-harfbuzz 1.7.5-2.7.4 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-libffi 3.2.1.git259-2.3.3 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-libffi-gcc5 5.3.1+r233831-14.1 SUSE-SU-2019:14246-1
SLES 11 SP4 firefox-pango 1.40.14-2.7.4 SUSE-SU-2019:14246-1
SLES 11 SP4 mozilla-nspr 4.21-29.6.1 SUSE-SU-2019:14246-1
SLES 11 SP4 mozilla-nss 3.45-38.9.3 SUSE-SU-2019:14246-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SUSE OpenStack Cloud 7 nodejs6 6.14.1-11.12.1 SUSE-SU-2018:1183-1
SUSE Enterprise Storage 4 nodejs4 4.9.1-15.11.1 SUSE-SU-2018:0952-1
SUSE Enterprise Storage 4 nodejs6 6.14.1-11.12.1 SUSE-SU-2018:1183-1
ReleasePackageFixed inAdvisory
Alpine v3.24 nodejs 8.11.0-r0 —
Alpine v3.24 nodejs-current 9.10.0-r0 —
Alpine v3.23 nodejs 8.11.0-r0 —
Alpine v3.23 nodejs-current 9.10.0-r0 —
Alpine v3.22 nodejs 8.11.0-r0 —
Alpine v3.22 nodejs-current 9.10.0-r0 —
Alpine v3.21 nodejs 8.11.0-r0 —
Alpine v3.21 nodejs-current 9.10.0-r0 —
Alpine v3.20 nodejs 8.11.0-r0 —
Alpine v3.20 nodejs-current 9.10.0-r0 —
Show 12 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 nodejs 8.11.0-r0 —
Alpine v3.19 nodejs-current 9.10.0-r0 —
Alpine v3.18 nodejs 8.11.0-r0 —
Alpine v3.18 nodejs-current 9.10.0-r0 —
Alpine v3.17 nodejs 8.11.0-r0 —
Alpine v3.17 nodejs-current 9.10.0-r0 —
Alpine v3.16 nodejs 8.11.0-r0 —
Alpine v3.16 nodejs-current 9.10.0-r0 —
Alpine v3.15 nodejs 8.11.0-r0 —
Alpine v3.15 nodejs-current 9.10.0-r0 —
Alpine v3.14 nodejs 8.11.0-r0 —
Alpine v3.14 nodejs-current 9.10.0-r0 —
Alpine v3.13 nodejs 8.11.0-r0 —
Alpine v3.13 nodejs-current 9.10.0-r0 —
Alpine v3.12 nodejs 8.11.0-r0 —
Alpine v3.12 nodejs-current 9.10.0-r0 —
Alpine v3.11 nodejs 8.11.0-r0 —
Alpine v3.11 nodejs-current 9.10.0-r0 —
Alpine v3.10 nodejs 8.11.0-r0 —
Alpine v3.10 nodejs-current 9.10.0-r0 —
Alpine v3.9 nodejs 8.11.0-r0 —
Alpine v3.9 nodejs-current 9.10.0-r0 —
Alpine v3.8 nodejs 8.11.0-r0 —
Alpine v3.8 nodejs-current 9.10.0-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 http-parser +1 2.7.1-8.amzn2 ALAS2-2019-1322

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 rubygem-http_parser 0.8.0-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 http-parser +1 2.7.1-8.el7 ELSA-2019-2258

Advisories 8

References