CVE-2024-23821: GeoServer's GWC Demos Page vulnerable to Stored Cross-Site Scripting (XSS)
4.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.56103%
CWE
Published
3/20/2024
Updated
3/20/2024
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.geoserver:gs-gwc | maven | >= 2.24.0, < 2.24.1 | 2.24.1 |
org.geoserver:gs-gwc | maven | < 2.23.4 | 2.23.4 |
Vulnerability Intelligence
Miggo AI
Root 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.