CVE-2022-34305:
Cross-site Scripting in Apache Tomcat
6.1
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
6/24/2022
Updated
1/27/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.apache.tomcat:tomcat | maven | >= 10.1.0-M1, <= 10.1.0-M16 | 10.1.0-M17 |
org.apache.tomcat:tomcat | maven | >= 10.0.0-M1, < 10.0.22 | 10.0.22 |
org.apache.tomcat:tomcat | maven | >= 9.0.30, < 9.0.65 | 9.0.65 |
org.apache.tomcat:tomcat | maven | >= 8.5.50, < 8.5.82 | 8.5.82 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unfiltered output of session attributes in Tomcat's Form authentication example JSP. The patches add util.HTMLFilter.filter() wrappers around these outputs. In vulnerable versions, the JSP's generated servlet _jspService method would contain direct write operations for:<br/>1. Session attribute names (name variable)<br/>2. Session attribute values (session.getAttribute(name))<br/>These appear in the profiler as the JSP's service method handling requests to /examples/jsp/security/protected/index.jsp. The exact function is the auto-generated _jspService method in the JSP's compiled servlet class, which maps to the original vulnerable JSP file location.