CVE-2019-0221 Cross-site scripting in Apache Tomcat
Cross-site scripting vulnerability in Apache Tomcat SSI printenv command allows attackers to execute arbitrary scripts if SSI is enabled.
- 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-2019-0221?
CVE-2019-0221 is a medium-severity cross-site scripting vulnerability in Apache Tomcat, published on 28 May 2019. 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 SSI printenv command in Apache Tomcat 9.0.0.M1 to 9.0.0.17, 8.5.0 to 8.5.39 and 7.0.0 to 7.0.93 echoes user provided data without escaping and is, therefore, vulnerable to XSS. SSI is disabled by default. The printenv command is intended for debugging and is unlikely to be present in a production website.
Weakness: CWE-79
Which versions are affected by CVE-2019-0221?
18 open source packages ship an affected version, including org.apache.tomcat.embed:tomcat-embed-core, org.apache.tomcat:tomcat and org.apache.tomcat:tomcat-catalina. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.tomcat.embed:tomcat-embed-core Maven | From 7.0.0 | 7.0.94 |
org.apache.tomcat.embed:tomcat-embed-core Maven | From 7.0.0 | 7.0.94 |
org.apache.tomcat.embed:tomcat-embed-core Maven | From 8.5.0 | 8.5.40 |
org.apache.tomcat.embed:tomcat-embed-core Maven | From 8.5.0 | 8.5.40 |
org.apache.tomcat.embed:tomcat-embed-core Maven | From 9.0.0 | 9.0.17 |
org.apache.tomcat.embed:tomcat-embed-core Maven | From 9.0.0 | 9.0.17 |
12 more packages
org.apache.tomcat:tomcat Maven | From 7.0.0 | 7.0.94 |
org.apache.tomcat:tomcat Maven | From 7.0.0 | 7.0.94 |
org.apache.tomcat:tomcat Maven | From 8.5.0 | 8.5.40 |
org.apache.tomcat:tomcat Maven | From 8.5.0 | 8.5.40 |
org.apache.tomcat:tomcat Maven | From 9.0.0 | 9.0.17 |
org.apache.tomcat:tomcat Maven | From 9.0.0 | 9.0.17 |
org.apache.tomcat:tomcat-catalina Maven | From 7.0.0 | 7.0.94 |
org.apache.tomcat:tomcat-catalina Maven | From 7.0.0 | 7.0.94 |
org.apache.tomcat:tomcat-catalina Maven | From 8.5.0 | 8.5.40 |
org.apache.tomcat:tomcat-catalina Maven | From 8.5.0 | 8.5.40 |
org.apache.tomcat:tomcat-catalina Maven | From 9.0.0 | 9.0.17 |
org.apache.tomcat:tomcat-catalina Maven | From 9.0.0 | 9.0.17 |
Products include Apache Tomcat.
How do I fix CVE-2019-0221?
Upgrade org.apache.tomcat.embed:tomcat-embed-core to a fixed version for your release line: 7.0.94, 8.5.40 or 9.0.17.
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-2019-0221 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2019-0221 exists.
Public exploit code: 1 Exploit-DB entry and 1 Nuclei template.
Other vulnerabilities in Apache Tomcat
Sources
Also known as CLSA-2022-1670606563, DEBIAN-CVE-2019-0221, DLA-1810-1, GHSA-jjpq-gp5q-8q6w, UBUNTU-CVE-2019-0221.