CVE-2022-34305 XSS in examples web application
Cross-site scripting in the Tomcat examples web application allows attackers to execute scripts in user browsers, requiring the examples app to be 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-2022-34305?
CVE-2022-34305 is a medium-severity cross-site scripting vulnerability in Apache Tomcat, published on 23 Jun 2022. 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
In Apache Tomcat 10.1.0-M1 to 10.1.0-M16, 10.0.0-M1 to 10.0.22, 9.0.30 to 9.0.64 and 8.5.50 to 8.5.81 the Form authentication example in the examples web application displayed user provided data without filtering, exposing a XSS vulnerability.
Weakness: CWE-79
Which versions are affected by CVE-2022-34305?
9 open source packages ship an affected version, including org.apache.tomcat:tomcat and tomcat. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.tomcat:tomcat Maven | From 10.0.0-M1 | 10.0.22 |
org.apache.tomcat:tomcat Maven | From 10.0.0-M1 | 10.0.22 |
org.apache.tomcat:tomcat Maven | From 10.1.0-M1 | 10.1.0-M17 |
org.apache.tomcat:tomcat Maven | From 10.1.0-M1 | 10.1.0-M17 |
org.apache.tomcat:tomcat Maven | From 8.5.50 | 8.5.82 |
org.apache.tomcat:tomcat Maven | From 8.5.50 | 8.5.82 |
3 more packages
org.apache.tomcat:tomcat Maven | From 9.0.30 | 9.0.65 |
org.apache.tomcat:tomcat Maven | From 9.0.30 | 9.0.65 |
tomcat Bitnami | From 8.5.50 | 8.5.82, 9.0.65, 10.0.23 |
Products include Apache Tomcat.
How do I fix CVE-2022-34305?
Upgrade org.apache.tomcat:tomcat to a fixed version for your release line: 10.0.22, 10.1.0-M17, 8.5.82 or 9.0.65.
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-2022-34305 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-34305 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in Apache Tomcat
Sources
Also known as BIT-tomcat-2022-34305, CLEANSTART-2026-EU30316, CLSA-2026-1787564106, DEBIAN-CVE-2022-34305, GHSA-6j88-6whg-x687, UBUNTU-CVE-2022-34305.