CVE-2018-12121: Denial of Service with large HTTP headers
A flaw was found in Node.js versions before 6.15.0, 8.14.0, 10.14.0 and 11.3.0. A Denial of Service with large HTTP headers. By using a combination of many requests with maximum sized headers (almost 80 KB per connection), and carefully timed completion of the headers, it is possible to cause the HTTP server to abort from heap allocation failure. Attack potential is mitigated by the use of a load balancer or other proxy layer.
References: https://nodejs.org/en/blog/vulnerability/november-2018-security-releases/
Other sources
Categorization: Uncontrolled Resource Consumption / Denial of Service (CWE-400)
All versions of 6 and later are vulnerable and the severity is HIGH. By using a combination of many requests with maximum sized headers (almost 80 KB per connection), and carefully timed completion of the headers, it is possible to cause the HTTP server to abort from heap allocation failure. Attack potential is mitigated by the use of a load balancer or other proxy layer.
The total size of HTTP headers received by Node.js now must not exceed 8192 bytes.
Reported by Trevor Norris, fixed by Matteo Collina.
All versions of Node.js 6 (LTS "Boron") are vulnerable
All versions of Node.js 8 (LTS "Carbon") are vulnerable
All versions of Node.js 10 (LTS "Dubnium") are vulnerable
All versions of Node.js 11 (Current) are vulnerable
— Node.Js
CVE-2018-12121 Node.js: All versions prior to Node.js 6.15.0, 8.14.0, 10.14.0 and 11.3.0: Denial of Service with large HTTP headers: By using a combination of many requests with maximum sized headers (almost 80 KB per connection), and carefully timed completion of the headers, it is possible to cause the HTTP server to abort from heap allocation failure. Attack potential is mitigated by the use of a load balancer or other proxy layer. CVE-2018-12122 Node.js: All versions prior to Node.js 6.15.0, 8.14.0, 10.14.0 and 11.3.0: Slowloris HTTP Denial of Service: An attacker can cause a Denial of Service (DoS) by sending headers very slowly keeping HTTP or HTTPS connections and associated resources alive for a long period of time. CVE-2018-12123 Node.js: All versions prior to Node.js 6.15.0, 8.14.0, 10.14.0 and 11.3.0: Hostname spoofing in URL parser for javascript protocol: If a Node.js application is using url.parse() to determine the URL hostname, that hostname can be spoofed by using a mixed case "javascript:" (e.g. "javAscript:") protocol (other protocols are not affected). If security decisions are made about the URL based on the hostname, they may be incorrect.
— F5
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 17.5.117.1.3 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.1 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 6.15.0 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 8.14.0 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 10.14.0 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 11.3.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.15.0Fixed in 8.14.0Fixed in 10.14.0Fixed in 11.3.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.14.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 11.3.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.15.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.14.0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 10.14.0-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 8.14.0-r0 - Upgrade
Upgrade
alpine/nodejs-currentto a version that resolves this vulnerability.Fixed in 11.3.0-r0 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 6.15.0 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 8.14.0 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 10.14.0 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 11.3.0 - Compensating control
Place a load balancer or other proxy layer in front of the Node.js HTTP server to mitigate attack potential.
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2018-12121?
CVE-2018-12121 has been rated as a medium severity vulnerability due to its potential to cause a Denial of Service condition.
How do I fix CVE-2018-12121?
To fix CVE-2018-12121, upgrade Node.js to version 6.15.0, 8.14.0, 10.14.0, or 11.3.0 or apply patches provided by your vendor.
Which versions of Node.js are affected by CVE-2018-12121?
Node.js versions prior to 6.15.0, 8.14.0, 10.14.0, and 11.3.0 are affected by CVE-2018-12121.
What are the potential impacts of CVE-2018-12121?
CVE-2018-12121 could lead to a Denial of Service attack by exploiting large HTTP headers.
Is CVE-2018-12121 exploitable remotely?
Yes, CVE-2018-12121 can be exploited remotely through crafted HTTP requests.