Miggo Logo

CVE-2024-23821: GeoServer's GWC Demos Page vulnerable to Stored Cross-Site Scripting (XSS)

4.8

CVSS Score
3.1

Basic Information

EPSS Score
0.56103%
Published
3/20/2024
Updated
3/20/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.geoserver:gs-gwcmaven>= 2.24.0, < 2.24.12.24.1
org.geoserver:gs-gwcmaven< 2.23.42.23.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insufficient output encoding in the GWC Demos Page rendering logic. The pull request #1173 specifically modifies Demo.java to replace StringEscapeUtils.escapeEcmaScript with OWASP Encoder's forHtmlContent and forHtmlAttribute methods, indicating this was the vulnerable area. The Demo class handles the demo page generation where user-controlled input (layer names/parameters) was rendered without proper HTML context-aware escaping, making it susceptible to stored XSS attacks when malicious payloads are injected into the catalog.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * stor** *ross-sit* s*riptin* (XSS) vuln*r**ility *xists t**t *n**l*s *n *ut**nti**t** **ministr*tor wit* worksp***-l*v*l privil***s to stor* * J*v*S*ript p*ylo** in t** **oS*rv*r **t*lo* t**t will *x**ut* in t** *ont*xt o* *not**r us*r's

Reasoning

T** vuln*r**ility st*ms *rom insu**i*i*nt output *n*o*in* in t** *W* **mos P*** r*n**rin* lo*i*. T** pull r*qu*st #**** sp**i*i**lly mo*i*i*s `**mo.j*v*` to r*pl*** `Strin**s**p*Utils.*s**p***m*S*ript` wit* OW*SP *n*o**r's `*or*tml*ont*nt` *n* `*or*t