In short
- CVE-2025-21621 is a MEDIUM (CVSS 6.1) vulnerability affecting org.geoserver.web:gs-web-app, org.geoserver:gs-wms, geoserver (geoserver).
- Chance of exploitation in the next 30 days (EPSS): 0.32%, higher than 24.7% of all vulnerabilities.
- Fix: update to 2.25.0 or later.
Description
Summary
A reflected cross-site scripting (XSS) vulnerability exists in the WMS GetFeatureInfo HTML output format that enables a remote attacker to execute arbitrary JavaScript code in a victim's browser through specially crafted SLD_BODY parameters.
Details
The WMS service setting that controls HTML auto-escaping is either disabled by default, or completely missing, in the affected versions (see workarounds).
Impact
If an attacker can control a script that is executed in the victim's browser, then they can typically fully compromise that user. Amongst other things, the attacker can:
- Perform any action within the application that the user can perform.
- View any information that the user is able to view.
- Modify any information that the user is able to modify.
- Initiate interactions with other application users, including malicious attacks, that will appear to originate from the initial victim user.
Workarounds
Changing any of the following WMS service settings should mitigate this vulnerability in most environments:
- Enable GetFeatureInfo HTML auto-escaping (available in GeoServer 2.21.3+ and 2.22.1+)
- Disable dynamic styling
- Disable GetFeatureInfo text/html MIME type
References
https://osgeo-org.atlassian.net/browse/GEOS-11297
https://github.com/geoserver/geoserver/pull/7406
NVD description
GeoServer is an open source server that allows users to share and edit geospatial data. Prior to version 2.25.0, a reflected cross-site scripting (XSS) vulnerability exists in the WMS GetFeatureInfo HTML output format that enables a remote attacker to execute arbitrary JavaScript code in a victim's browser through specially crafted SLD_BODY parameters. This issue has been patched in version 2.25.0.
More vulnerabilities in org.geoserver.web:gs-web-app
See all →Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free