CVE-2022-34305: Cross-Site Scripting in Apache Tomcat Form Authentication Example
- Vendor
- Apache Software Foundation
CVE-2022-34305 is a cross-site scripting vulnerability in the examples web application shipped with Apache Tomcat. The flaw affects the Form authentication example in Apache Tomcat 10.1.0-M1 through 10.1.0-M16, 10.0.0-M1 through 10.0.22, 9.0.30 through 9.0.64, and 8.5.50 through 8.5.81. The vulnerable example reflects or displays user-supplied data without proper output filtering or sanitization, allowing untrusted script content to be rendered in a victim's browser. The issue is in demonstration/example functionality rather than Tomcat's core request-processing engine, but it is exploitable wherever the examples application is deployed and reachable.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows attacker-controlled script to execute in the browser of a user who accesses the vulnerable Form authentication example with malicious input. This can enable session theft, credential capture, user impersonation within the affected application context, content manipulation, and execution of arbitrary actions on behalf of the victim in the browser, subject to the victim's privileges and browser security controls.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, disable, undeploy, or remove the examples web application, especially the Form authentication example, from production and internet-accessible systems. Restrict access to demonstration applications to trusted administrative networks only, and avoid deploying sample applications in production environments.
Remediation
Patch, then assume compromise.
Upgrade Apache Tomcat to a fixed release. Reported fixed versions are 10.1.0-M17 or later, 10.0.23 or later, 9.0.65 or later, and 8.5.82 or later. If the examples web application is present in downstream distributions or bundled products, ensure the embedded Tomcat instance is updated to a non-vulnerable version.
Exploits
No validated public exploits yet. Hidden: 1 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2022-34305 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2022-34305 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2022-34305?
- As of Oct 16, 2026, Mallory has found no public exploit for CVE-2022-34305.
- Is there a patch for CVE-2022-34305?
- Upgrade Apache Tomcat to a fixed release. Reported fixed versions are 10.1.0-M17 or later, 10.0.23 or later, 9.0.65 or later, and 8.5.82 or later.
- What products are affected by CVE-2022-34305?
- Apache Software Foundation Tomcat.
- How severe is CVE-2022-34305?
- CVE-2022-34305 has a CVSS v3.1 score of 6.1 (Medium) and an EPSS score of 6.7% (94th percentile) as of Oct 16, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.