Miggo Logo

CVE-2008-1947: Apache Tomcat Cross-site scripting (XSS) vulnerability

4.3

CVSS Score

Basic Information

EPSS Score
0.97643%
Published
5/1/2022
Updated
3/5/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
AV:N/AC:M/Au:N/C:N/I:P/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.tomcat:tomcatmaven>= 5.5.9, <= 5.5.265.5.27
org.apache.tomcat:tomcatmaven>= 6.0.0, <= 6.0.166.0.18
org.apache.tomcat.embed:tomcat-embed-coremaven>= 5.5.9, <= 5.5.265.5.27
org.apache.tomcat.embed:tomcat-embed-coremaven>= 6.0.0, <= 6.0.166.0.18

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from two flaws in HTMLHostManagerServlet:

  1. URL construction for host management actions (start/stop/remove) directly concatenated user-controlled hostName parameter into URLs without URL encoding, allowing script injection via query parameters.
  2. The hostName value was rendered in HTML responses without proper output encoding. The patch added URL encoding for URL construction and RequestUtil.filter for HTML context, confirming these were the vulnerable points.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*ross-sit* s*riptin* (XSS) vuln*r**ility in *p**** Tom**t *.*.* t*rou** *.*.** *n* *.*.* t*rou** *.*.** *llows r*mot* *tt**k*rs to inj**t *r*itr*ry w** s*ript or *TML vi* t** n*m* p*r*m*t*r (*k* t** *ostn*m* *ttri*ut*) to `*ost-m*n***r/*tml/***`.

Reasoning

T** vuln*r**ility st*mm** *rom two *l*ws in *TML*ostM*n***rS*rvl*t: *. URL *onstru*tion *or *ost m*n***m*nt **tions (st*rt/stop/r*mov*) *ir**tly *on**t*n*t** us*r-*ontroll** *ostN*m* p*r*m*t*r into URLs wit*out URL *n*o*in*, *llowin* s*ript inj**tion