CVE-2025-21621: GeoServer Reflected Cross-Site Scripting (XSS) vulnerability in WMS GetFeatureInfo HTML format

Published Nov 25, 2025
·
Updated

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 SLDBODY 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

Other sources

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 SLDBODY parameters. This issue has been patched in version 2.25.0.

MITRE

Affected Software

3 affected componentsFixes available
maven/org.geoserver:gs-wms<2.25.0
2.25.0
maven/org.geoserver.web:gs-web-app<2.25.0
2.25.0
GeoServer geoserver<2.25.0

Event History

Nov 25, 2025
Advisory Published
via GitHub·06:41 PM
Data Sourced
via GitHub·06:41 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:52 PM
Data Sourced
via MITRE·09:52 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21621?

CVE-2025-21621 is classified as a reflected cross-site scripting (XSS) vulnerability.

2

How do I fix CVE-2025-21621?

To fix CVE-2025-21621, upgrade to version 2.25.0 of the affected software packages.

3

What software is affected by CVE-2025-21621?

CVE-2025-21621 affects the org.geoserver:gs-wms and org.geoserver.web:gs-web-app packages in versions prior to 2.25.0.

4

What does CVE-2025-21621 allow attackers to do?

CVE-2025-21621 allows attackers to execute arbitrary JavaScript code in a victim's browser.

5

How can I validate if CVE-2025-21621 has been patched?

You can validate the patch for CVE-2025-21621 by ensuring that your software version is updated to 2.25.0 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203