GHSA-w66h-j855-qr72
GeoServer has a Reflected Cross-Site Scripting (XSS) vulnerability in its WMS GetFeatureInfo HTML format
Quick fix
GHSA-w66h-j855-qr72 — org.geoserver.web:gs-web-app: upgrade to the fixed version with the command below.
# pom.xml: bump <version>2.25.0</version> for org.geoserver.web:gs-web-appDetails
### 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
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 2.25.0# pom.xml: bump <version>2.25.0</version> for org.geoserver.web:gs-web-app0Fixed in: 2.25.0# pom.xml: bump <version>2.25.0</version> for org.geoserver:gs-wmsReferences
- https://github.com/geoserver/geoserver/security/advisories/GHSA-w66h-j855-qr72[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2025-21621[ADVISORY]
- https://github.com/geoserver/geoserver/pull/7406[WEB]
- https://github.com/geoserver/geoserver/commit/dc9ff1c726dd73c884437a123b4ad72b19383c7d[WEB]
- https://github.com/geoserver/geoserver[PACKAGE]
- https://osgeo-org.atlassian.net/browse/GEOS-11203[WEB]
- https://osgeo-org.atlassian.net/browse/GEOS-11297[WEB]