S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
medium·Product Based Web Vulnerabilities·Updated Dec 16, 2025

CVE-2022-34305 Scanner

CVE-2022-34305 Scanner - Cross-Site Scripting (XSS) vulnerability in Apache Tomcat

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsdomain, subdomain, ipv4
CostFree
2.4k
Times Used
continuous scan runs
5.9k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2022-34305
6.1
CVSS

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.

Attack Vector
-
Privileges Req.
-
User Interaction
-
Affected
Apache Tomcatby Apache Software Foundation
Apache Tomcat 8.5 8.5.50 to 8.5.81
Updated Aug 22, 2026View on NVD →
Detail

Apache Tomcat is widely used as a Java Servlet container, running web applications developed in Java. It is utilized by anyone from developers testing Java applications to large enterprises hosting complex websites and applications. Organizations use Apache Tomcat for its robustness and scalability, which can serve dynamic web content efficiently. Apache Tomcat Examples Web Application helps developers by providing example code and configuration for developing web apps using Tomcat's capabilities. It is typically deployed in development, testing, and sometimes even production environments due to its ease of use and extensive community support. Tomcat helps reduce the need for complex configurations and helps developers focus more on writing their applications.

The Cross-Site Scripting (XSS) vulnerability in Apache Tomcat allows attackers to inject malicious scripts into web pages viewed by other users. This flaw is due to improper validation of user-supplied input that ends up being displayed. By crafting specially designed input, an attacker can execute scripts in a victim's browser within the context of a vulnerable application. Exploiting this vulnerability allows attackers to steal session cookies, perform defacement, or redirect users to malicious sites. It is critical because it only requires an unsuspecting user to load the crafted input by visiting a tainted page or following a malicious link. Proper input validation and context-aware escaping can help mitigate such vulnerabilities.

The vulnerability arises in the Form authentication example module, where unfiltered user data can directly render into the user's browser. An example of a vulnerable endpoint is where user input is accepted without validation and used in the webpage responses, such as GET and POST requests to `/examples/jsp/security/protected/`. Attackers exploit this by injecting script snippets like ``, which upon rendering, execute a script tag in the user's browser. The attack vector here necessitates an unauthorized user injecting data directly affecting the victim's session within the Apache Tomcat instance. This exploits default behaviors in the session management and improper sanitization of HTML in response content.

When exploited, this vulnerability can compromise the confidentiality of user data and integrity of web sessions. Users might experience session hijacking, where attackers can impersonate them by stealing session cookies and authenticating data. This could lead to unauthorized access and data exfiltration from web applications, potentially altering critical web content. The exploit could also perform phishing attacks by redirecting users to counterfeit login pages identical in appearance to legitimate ones, capturing their credentials. This could result in mass user account compromise if attackers script such occurrences at scale, significantly impacting user trust and service integrity.

REFERENCES

Solution Advice
  • Update Apache Tomcat to the latest version where this vulnerability is patched.
  • Implement proper input validation and output encoding to prevent scripts from executing.
  • Employ security headers such as Content Security Policy (CSP) to mitigate XSS attacks.
  • Regularly audit and test your applications and web server configurations for security weaknesses.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2022-34305 Scanner - Cross-Site Scripting (XSS) vulnerability in Apache Tomcat | S4E