CVE-2022-42252: Apache Tomcat request smuggling via malformed content-length
Apache Tomcat is vulnerable to HTTP request smuggling, caused by the failure to reject a request containing an invalid Content-Length header when configured to ignore invalid HTTP headers via setting rejectIllegalHeader to false. By sending a specially-crafted request, an attacker could exploit this vulnerability to poison the web cache, bypass web application firewall protection, and conduct XSS attacks.
Other sources
If Apache Tomcat 8.5.0 to 8.5.52, 9.0.0-M1 to 9.0.67, 10.0.0-M1 to 10.0.26 or 10.1.0-M1 to 10.1.0 was configured to ignore invalid HTTP headers via setting rejectIllegalHeader to false (the default for 8.5.x only), Tomcat did not reject a request containing an invalid Content-Length header making a request smuggling attack possible if Tomcat was located behind a reverse proxy that also failed to reject the request with the invalid header.
https://lists.apache.org/thread/zzcxzvqfdqn515zfs3dxb7n8gty589sq
— Red Hat
If Apache Tomcat 8.5.0 to 8.5.82, 9.0.0-M1 to 9.0.67, 10.0.0-M1 to 10.0.26 or 10.1.0-M1 to 10.1.0 was configured to ignore invalid HTTP headers via setting rejectIllegalHeader to false (the default for 8.5.x only), Tomcat did not reject a request containing an invalid Content-Length header making a request smuggling attack possible if Tomcat was located behind a reverse proxy that also failed to reject the request with the invalid header.
— Ubuntu
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.apache.tomcat:tomcat-coyoteto a version that resolves this vulnerability.Fixed in 10.1.1 - Upgrade
Upgrade
maven/org.apache.tomcat:tomcat-coyoteto a version that resolves this vulnerability.Fixed in 10.0.27 - Upgrade
Upgrade
maven/org.apache.tomcat:tomcat-coyoteto a version that resolves this vulnerability.Fixed in 9.0.68 - Upgrade
Upgrade
maven/org.apache.tomcat.embed:tomcat-embed-coreto a version that resolves this vulnerability.Fixed in 10.1.1 - Upgrade
Upgrade
maven/org.apache.tomcat.embed:tomcat-embed-coreto a version that resolves this vulnerability.Fixed in 10.0.27 - Upgrade
Upgrade
maven/org.apache.tomcat.embed:tomcat-embed-coreto a version that resolves this vulnerability.Fixed in 9.0.68 - Upgrade
Upgrade
maven/org.apache.tomcat.embed:tomcat-embed-coreto a version that resolves this vulnerability.Fixed in 8.5.83 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 10.1.1 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 10.0.27 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 9.0.68 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 8.5.83 - Upgrade
Upgrade
debian/tomcat9to a version that resolves this vulnerability.Fixed in 9.0.43-2~deb11u10Fixed in 9.0.70-2 - Upgrade
Upgrade
ubuntu/tomcat8to a version that resolves this vulnerability.Fixed in 8.5.39-1ubuntu1~18.04.3+ - Upgrade
Upgrade
ubuntu/tomcat8to a version that resolves this vulnerability.Fixed in 8.5.82 - Upgrade
Upgrade
ubuntu/tomcat9to a version that resolves this vulnerability.Fixed in 9.0.16-3ubuntu0.18.04.2+ - Upgrade
Upgrade
ubuntu/tomcat9to a version that resolves this vulnerability.Fixed in 9.0.31-1ubuntu0.5 - Upgrade
Upgrade
ubuntu/tomcat9to a version that resolves this vulnerability.Fixed in 9.0.58-1ubuntu0.1+ - Upgrade
Upgrade
ubuntu/tomcat9to a version that resolves this vulnerability.Fixed in 9.0.68 - Configuration
Set rejectIllegalHeader to true so Tomcat rejects requests with invalid Content-Length headers (the vulnerability occurs when rejectIllegalHeader is false).
Apache Tomcat rejectIllegalHeader = true
Event History
Frequently Asked Questions
What is the vulnerability ID for this Apache Tomcat vulnerability?
The vulnerability ID for this Apache Tomcat vulnerability is CVE-2022-42252.
What is the severity of CVE-2022-42252?
The severity of CVE-2022-42252 is high with a CVSS score of 7.5.
Which versions of Apache Tomcat are affected by CVE-2022-42252?
Apache Tomcat versions 8.5.0 to 8.5.82, 9.0.0-M1 to 9.0.67, 10.0.0-M1 to 10.0.26, and 10.1.0-M1 to 10.1.0 are affected by CVE-2022-42252.
How can I fix CVE-2022-42252?
To fix CVE-2022-42252, upgrade your Apache Tomcat installation to version 8.5.83, 9.0.68, 10.0.27, or 10.1.1 depending on the version you are using.
Are there any references related to CVE-2022-42252?
Yes, you can find more information about CVE-2022-42252 from the following references: - [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-42252) - [Apache Tomcat Mailing List](https://lists.apache.org/thread/zzcxzvqfdqn515zfs3dxb7n8gty589sq) - [Gentoo Security Advisory](https://security.gentoo.org/glsa/202305-37)