CVE-2016-6816 Improper Input Validation in Apache Tomcat

High 7.1 Published Updated

Attackers can inject data into HTTP responses via invalid characters, enabling XSS, cache poisoning, and sensitive information disclosure in Apache Tomcat.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2016-6816?

CVE-2016-6816 is a high-severity cross-site scripting vulnerability in Apache Tomcat, published on 20 Mar 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

The code in Apache Tomcat 9.0.0.M1 to 9.0.0.M11, 8.5.0 to 8.5.6, 8.0.0.RC1 to 8.0.38, 7.0.0 to 7.0.72, and 6.0.0 to 6.0.47 that parsed the HTTP request line permitted invalid characters. This could be exploited, in conjunction with a proxy that also permitted the invalid characters but with a different interpretation, to inject data into the HTTP response. By manipulating the HTTP response the attacker could poison a web-cache, perform an XSS attack and/or obtain sensitive information from requests other then their own.

Weakness: CWE-20

Which versions are affected by CVE-2016-6816?

10 open source packages ship an affected version, including org.apache.tomcat:tomcat-coyote. It affects 1 product.

PackageAffectedFixed in
org.apache.tomcat:tomcat-coyote MavenFrom 6.0.06.0.48
org.apache.tomcat:tomcat-coyote MavenFrom 6.0.06.0.48
org.apache.tomcat:tomcat-coyote MavenFrom 7.0.07.0.73
org.apache.tomcat:tomcat-coyote MavenFrom 7.0.07.0.73
org.apache.tomcat:tomcat-coyote MavenFrom 8.0.0RC18.0.39
org.apache.tomcat:tomcat-coyote MavenFrom 8.0.0RC18.0.39
4 more packages
org.apache.tomcat:tomcat-coyote MavenFrom 8.5.08.5.8
org.apache.tomcat:tomcat-coyote MavenFrom 8.5.08.5.8
org.apache.tomcat:tomcat-coyote MavenFrom 9.0.0.M19.0.0.M12
org.apache.tomcat:tomcat-coyote MavenFrom 9.0.0.M19.0.0.M12

Products include Apache Tomcat.

How do I fix CVE-2016-6816?

Upgrade org.apache.tomcat:tomcat-coyote to a fixed version for your release line: 6.0.48, 7.0.73, 8.0.39 or 8.5.8.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2016-6816 being exploited?

There is no known exploitation of CVE-2016-6816 in the wild and no public exploit code.

Public exploit code: 1 Exploit-DB entry.

All Apache Tomcat vulnerabilities

Sources

Also known as GHSA-jc7p-5r39-9477, UBUNTU-CVE-2016-6816.

Is CVE-2016-6816 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free