CVE-2021-22960: HTTP Request Smuggling when parsing the body
An HTTP Request Smuggling (HRS) vulnerability was found in the llhttp library, used by Node.JS. During the parsing of chunked messages, the chunk size parameter was not validated properly. In situations where HTTP conversations are being proxied (such as proxy, reverse-proxy, load-balancer), an attacker can use this flaw to inject arbitrary messages through the proxy. The highest threat from this vulnerability is to confidentiality and integrity.
Other sources
Node.js is vulnerable to HTTP request smuggling, caused by an error when parsing the body of chunked requests. A remote attacker could send a specially-crafted request to lead to HTTP Request Smuggling (HRS). An attacker could exploit this vulnerability to poison the web cache, bypass web application firewall protection, and conduct XSS attacks.
— IBM
The http parser accepts requests with a space (SP) right after the header name before the colon. The http parser ignores chunk extensions when parsing the body of chunked requests. These can lead to HTTP Request Smuggling (HRS). See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22959 and https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22960 for more details.
— Node.Js
The parse function in llhttp < 2.1.4 and < 6.0.6. ignores chunk extensions when parsing the body of chunked requests. This leads to HTTP Request Smuggling (HRS) under certain conditions.
The parse ignores chunk extensions when parsing the body of chunked requests. This leads to HTTP Request Smuggling (HRS) under certain conditions.
The fix for this is included in llhttp v2.1.4 and v6.0.6.
Impacts:
All versions of the 16.x, 14.x, and 12.x releases lines.
— Red Hat
The parse ignores chunk extensions when parsing the body of chunked requests. This leads to HTTP Request Smuggling (HRS) under certain conditions. More details will be available at CVE-2021-22960 after publication.
THe fix for this is included in llhttp v2.1.4 and v6.0.6.
Thanks to Mattias Grenfeldt (https://grenfeldt.dev/) and Asta Olofsson for reporting this vulnerability.
All versions of the 16.x, 14.x, and 12.x releases lines.
— Node.Js
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/rh-nodejs14-nodejsto a version that resolves this vulnerability.Fixed in 0:14.18.2-1.el7 - Upgrade
Upgrade
redhat/rh-nodejs14-nodejs-nodemonto a version that resolves this vulnerability.Fixed in 0:2.0.3-6.el7 - Upgrade
Upgrade
redhat/rh-nodejs12-nodejsto a version that resolves this vulnerability.Fixed in 0:12.22.12-2.el7 - Upgrade
Upgrade
redhat/llhttpto a version that resolves this vulnerability.Fixed in 6.0.6 - Upgrade
Upgrade
redhat/llhttpto a version that resolves this vulnerability.Fixed in 2.1.4 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 12.22.7 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 14.18.1 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 16.11.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.22.7Fixed in 14.18.1Fixed in 16.11.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.22.7 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.18.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.11.1 - Upgrade
Upgrade
debian/nodejsto a version that resolves this vulnerability.Fixed in 18.20.4+dfsg-1~deb12u2Fixed in 18.20.4+dfsg-1~deb12u3Fixed in 20.19.2+dfsg-1+deb13u2Fixed in 20.19.2+dfsg-1+deb13u3Fixed in 24.21.0+dfsg+~cs24.13.4-1Fixed in 24.22.2+dfsg+~cs24.19.2-1 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 12.22.10-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 14.18.1-r0 - Upgrade
Upgrade
alpine/nodejs-currentto a version that resolves this vulnerability.Fixed in 16.11.1-r0 - Upgrade
Upgrade
llhttpto a version that resolves this vulnerability.Fixed in 2.1.4 - Upgrade
Upgrade
llhttpto a version that resolves this vulnerability.Fixed in 6.0.6
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-22960?
CVE-2021-22960 is an HTTP Request Smuggling (HRS) vulnerability in the llhttp library used by Node.JS.
How does CVE-2021-22960 affect the llhttp library?
CVE-2021-22960 affects versions of llhttp prior to 2.1.4 and 6.0.6, where the parse function ignores chunk extensions when parsing the body of chunked messages.
What is the severity of CVE-2021-22960?
CVE-2021-22960 has a severity value of 6.1, which is considered medium.
Which software packages are affected by CVE-2021-22960?
CVE-2021-22960 affects the following software packages: rh-nodejs14-nodejs, rh-nodejs14-nodejs-nodemon, rh-nodejs12-nodejs, llhttp, node.
How can I fix CVE-2021-22960?
To fix CVE-2021-22960, upgrade to llhttp version 2.1.4 or 6.0.6, or update the affected software packages to the recommended versions.