Back to CVE catalog
CVE-2018-7159

HTTP parser ignores spaces in Content-Length

The Node.js Project Node.js

At a glance

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.

Source description · CVE List / CNA

System impact

Attack complexityLow
ConfidentialityNone
IntegrityLow
AvailabilityNone

CVSS summary v3.1

5.3Medium
Published:
Updated:
EPSS:
3.542%
Exploited in attacks:
Not confirmed
Ransomware campaigns:
Not confirmed
Attack vector:
Network

Affected software

Vendor, product and affected version ranges.

Vendor, product and affected versions
Vendor:The Node.js ProjectNode.jsAffected versions:
4.xShow full version range for Node.js
6.x8.x9.x
Vendor:Red HatRed Hat Enterprise Linux Client (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux Client Optional (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux ComputeNode (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux ComputeNode Optional (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux Server (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux Server Optional (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux Workstation (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux Workstation Optional (v. 7)Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Software CollectionsAffected versions:Source does not specify a version range

1–10 of 15 · Page 1 of 2

CVSS scores and metrics4
[email protected] · NVD (Primary)Primary5.3 / 10MediumCVSS 3.1Details
Attack complexity
Low
Confidentiality
None
Integrity
Low
Availability
None
Attack vector
Network
Privileges required
Not required
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
CVE-2018-7159 · OSV (source-vector)5.3 / 10MediumCVSS 3.1Details
Attack complexity
Low
Confidentiality
None
Integrity
Low
Availability
None
Attack vector
Network
Privileges required
Not required
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Red Hat · Red Hat VEX (adp)5.3 / 10MediumCVSS 3.0Details
Attack complexity
Low
Confidentiality
None
Integrity
Low
Availability
None
Attack vector
Network
Privileges required
Not required
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
[email protected] · NVD (Primary)5.0 / 10MediumCVSS 2.0Details
Attack complexity
Low
Confidentiality
None
Integrity
Partial
Availability
None
Attack vector
Network
Authentication
Not required

Source vector

AV:N/AC:L/Au:N/C:N/I:P/A:N

CVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.

Sources and advisories8

This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences