CVE-2024-23642 GeoServer Stored Cross-Site Scripting (XSS) vulnerability in Simple SVG Renderer
An authenticated administrator can inject JavaScript into GeoServer's catalog, executing it in other users' browsers via the Simple SVG renderer.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-23642?
CVE-2024-23642 is a medium-severity cross-site scripting vulnerability in geoserver, published on 20 Mar 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Official description
GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. A stored cross-site scripting (XSS) vulnerability exists in versions prior to 2.23.4 and 2.24.1 that enables an authenticated administrator with workspace-level privileges to store a JavaScript payload in the GeoServer catalog that will execute in the context of another user's browser when viewed in the WMS GetMap SVG Output Format when the Simple SVG renderer is enabled. Access to the WMS SVG Format is available to all users by default although data and service security may limit users' ability to trigger the XSS. Versions 2.23.4 and 2.24.1 contain a fix for this issue.
Weakness: CWE-79
Which versions are affected by CVE-2024-23642?
4 open source packages ship an affected version, including org.geoserver:gs-wms. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.geoserver:gs-wms Maven | All versions | 2.23.4 |
org.geoserver:gs-wms Maven | All versions | 2.23.4 |
org.geoserver:gs-wms Maven | From 2.24.0 | 2.24.1 |
org.geoserver:gs-wms Maven | From 2.24.0 | 2.24.1 |
Products include Geoserver Geoserver.
How do I fix CVE-2024-23642?
Upgrade org.geoserver:gs-wms to a fixed version for your release line: 2.23.4 or 2.24.1.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-23642 being exploited?
There is no known exploitation of CVE-2024-23642 in the wild and no public exploit code.
Other vulnerabilities in geoserver
- CVE-2024-36401 OSGeo GeoServer GeoTools Eval Injection
- CVE-2025-58360 OSGeo GeoServer Improper Restriction of XML External Entity Reference
- CVE-2023-35042 GeoServer RCE due to improper control of generation of code in jai-ext`Jiffle` map algebra language
- CVE-2024-24749 Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat
- CVE-2023-41877 GeoServer log file path traversal vulnerability
Sources
Also known as GHSA-fg9v-56hw-g525.