CVE-2025-21621
JSON

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 packageVersionsReported by
geoserver geoserver< 2.25.0CVE List
org.geoserver.web:gs-web-app (Maven)before 2.25.0GitHub Advisory Database
org.geoserver:gs-wms (Maven)before 2.25.0GitHub Advisory Database
osgeo geoserverbefore 2.25.0NVD

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

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:

  1. Perform any action within the application that the user can perform.
  2. View any information that the user is able to view.
  3. Modify any information that the user is able to modify.
  4. 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:

  1. Enable GetFeatureInfo HTML auto-escaping (available in GeoServer 2.21.3+ and 2.22.1+)
  2. Disable dynamic styling
  3. 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

SourceRecordLicence
CVE ListCVE-2025-21621 changed 2025-11-26CVE Terms of Use
GitHub Advisory DatabaseGHSA-w66h-j855-qr72 changed 2025-11-27CC-BY-4.0
NVDCVE-2025-21621 changed 2026-11-30Public domain