6.1medium
GeoServer Reflected Cross-Site Scripting (XSS) vulnerability in WMS GetFeatureInfo HTML format
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.32% (higher than 26% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-w66h-j855-qr72
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| geoserver geoserver | < 2.25.0 | CVE List |
| org.geoserver.web:gs-web-app (Maven) | before 2.25.0 | GitHub Advisory Database |
| org.geoserver:gs-wms (Maven) | before 2.25.0 | GitHub Advisory Database |
| osgeo geoserver | before 2.25.0 | NVD |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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 (es)
GeoServer es un servidor de código abierto que permite a los usuarios compartir y editar datos geoespaciales. Versiones anteriores a la 2.25.0, existe una vulnerabilidad de cross-site scripting (XSS) reflejado en el formato de salida HTML de WMS GetFeatureInfo que permite a un atacante remoto ejecutar código JavaScript arbitrario en el navegador de una víctima a través de parámetros SLD_BODY especialmente diseñados. Este problema ha sido parcheado en la versión 2.25.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-21621 changed 2025-11-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w66h-j855-qr72 changed 2025-11-27 | CC-BY-4.0 |
| NVD | CVE-2025-21621 changed 2026-11-30 | Public domain |