CVE-2022-32213: bypass via obs-fold mechanic
A vulnerability was found in NodeJS due to improper validation of HTTP requests. The llhttp parser in the http module does not correctly parse and validate Transfer-Encoding headers. This issue can lead to HTTP Request Smuggling (HRS), causing web cache poisoning, and conducting XSS attacks.
Other sources
CVE-2022-32213
The llhttp parser in the http module does not correctly parse and validate Transfer-Encoding headers. This can lead to HTTP Request Smuggling (HRS).
More details will be available at CVE-2022-32213 after publication.
Thank you to Zeyu Zhang (@zeyu2001) for reporting this vulnerability.
Impacts:
All versions of the 18.x, 16.x, and 14.x releases lines. llhttp v6.0.7 and llhttp v2.1.5 contains the fixes that were updated inside Node.js
— Red Hat
Node.js is vulnerable to HTTP request smuggling, caused by the failure to correctly parse and validate Transfer-Encoding headers by the llhttp parser in the http module. 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 fix for CVE-2022-32213 can be bypassed using an obs-fold, which the Node.js HTTP parser supports. If the Node.js HTTP module is used as a proxy, then it incorrectly parses the transfer-encoding header as indicative of chunked request, while folding the headers and hence forwarding Transfer-Encoding: chunked abc which is not a valid transfer-encoding header to the downstream server. As such this can lead to HTTP request smuggling as indicated by CVE-2022-32213.
All versions of the 18.x, 16.x, and 14.x release lines.
llhttp v6.0.10 contains the fixes that were updated inside Node.js
— Node.Js
The llhttp parser <v14.20.1, <v16.17.1 and <v18.9.1 in the http module in Node.js does not correctly parse and validate Transfer-Encoding headers and can lead to HTTP Request Smuggling (HRS).
The llhttp parser in the http module in Node.js does not correctly parse and validate Transfer-Encoding headers. This can lead to HTTP Request Smuggling (HRS).
— Node.Js
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 1:16.16.0-1.el9_0 - Upgrade
Upgrade
redhat/rh-nodejs14-nodejsto a version that resolves this vulnerability.Fixed in 0:14.20.0-2.el7 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 14.20.0 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 16.20.0 - Upgrade
Upgrade
redhat/nodejsto a version that resolves this vulnerability.Fixed in 18.5.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.20.1Fixed in 16.17.1Fixed in 18.9.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.20.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.17.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 18.9.1 - Upgrade
Upgrade
debian/llhttpto a version that resolves this vulnerability.Fixed in 9.4.3+~cs12.11.9-2 - 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 14.20.1-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 16.17.1-r0 - Upgrade
Upgrade
alpine/nodejs-currentto a version that resolves this vulnerability.Fixed in 18.9.1-r0 - Upgrade
Upgrade
debian/nodejsto a version that resolves this vulnerability.Fixed in 18.6.0+dfsg-3 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 14.20.1 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 16.17.1 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 18.9.1 - Upgrade
Upgrade
llhttpto a version that resolves this vulnerability.Fixed in 6.0.10
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2022-32213?
CVE-2022-32213 is a vulnerability found in NodeJS due to improper validation of HTTP requests.
How does CVE-2022-32213 impact web applications?
CVE-2022-32213 can lead to HTTP Request Smuggling (HRS), causing web cache poisoning, and conducting XSS attacks.
What software versions are affected by CVE-2022-32213?
Versions of llhttp <v14.20.1, <v16.17.1, and <v18.9.1 in the http module in Node.js are affected.
What is the severity of CVE-2022-32213?
CVE-2022-32213 has a severity rating of 6.5 (medium).
How can I fix CVE-2022-32213?
To fix CVE-2022-32213, update Node.js to a version equal to or above v14.20.1, v16.17.1, or v18.9.1.