CVE-2024-45747: High severity maven/org.geoserver.web:gs-web-app vulnerability

Published Aug 19, 2026
·
Updated

Summary A server-side template injection (SSTI) vulnerability exist that allows an authenticated administrator to upload FreeMarker templates containing malicious content that can execute OS commands and read from or write to arbitrary files on the server. These FreeMarker templates are used in a plain GeoServer instance (no extension or community modules) for WMS GetFeatureInfo HTML and JSON and WMS GetMap KML and GeoRSS output formats.

Details The org.geoserver.template.TemplateUtils.getSafeConfiguration() method attempts to block access to the class freemarker.template.utility.Execute but it is still possible to gain access to it and other sensitive functionality by chaining a specific sequence of method calls.

Impact This vulnerability can lead to executing arbitrary code and reading and writing arbitrary files.

Resolution GeoServer 2.27.0 addresses this vulnerability with several new application properties:

GEOSERVERFREEMARKERBLOCKLIST GEOSERVERFREEMARKERALLOWLIST GEOSERVERFREEMARKERAPIEXPOSED

These application properties default to restricting the objects template authors can access, and limit access to "getter" methods used to access object properties.

Affected Software

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

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.geoserver.web:gs-web-app to a version that resolves this vulnerability.

    Fixed in 2.27.0
  2. Upgrade

    Upgrade maven/org.geoserver:gs-wms to a version that resolves this vulnerability.

    Fixed in 2.27.0
  3. Upgrade

    Upgrade maven/org.geoserver:gs-main to a version that resolves this vulnerability.

    Fixed in 2.27.0
  4. Upgrade

    Upgrade GeoServer to a version that resolves this vulnerability.

    Fixed in 2.27.0
  5. Configuration

    Set GeoServer's GEOSERVER_FREEMARKER_ALLOW_LIST to its default value (new in GeoServer 2.27.0) so FreeMarker template authors are restricted to the allowed objects.

    GeoServer application properties GEOSERVER_FREEMARKER_ALLOW_LIST = (use default restricting objects template authors can access)
  6. Configuration

    Set GeoServer's GEOSERVER_FREEMARKER_API_EXPOSED to its default value (new in GeoServer 2.27.0) to limit access to getter methods used to retrieve object properties.

    GeoServer application properties GEOSERVER_FREEMARKER_API_EXPOSED = (use default restricting access to getter methods)
  7. Configuration

    Set GeoServer's GEOSERVER_FREEMARKER_BLOCK_LIST to its default value (new in GeoServer 2.27.0) to block access to sensitive functionality such as freemarker.template.utility.Execute.

    GeoServer application properties GEOSERVER_FREEMARKER_BLOCK_LIST = (use default blocking dangerous APIs)

Event History

Aug 19, 2026
Advisory Published
via GitHub·07:31 PM
Data Sourced
via GitHub·07:31 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this vulnerability?

An authenticated GeoServer administrator who can upload FreeMarker templates can exploit it. The issue affects templates used for WMS GetFeatureInfo HTML and JSON output and WMS GetMap KML and GeoRSS output.

2

Does a standard GeoServer deployment use the affected functionality?

Yes. The affected FreeMarker template usage is present in a plain GeoServer instance; no extension or community modules are required.

3

What access does exploitation provide?

An attacker can execute operating-system commands and read from or write to arbitrary files on the GeoServer host. The vulnerable configuration can be bypassed to access freemarker.template.utility.Execute and other sensitive functionality.

4

What changes are available in the resolved release?

GeoServer 2.27.0 adds GEOSERVER_FREEMARKER_BLOCK_LIST, GEOSERVER_FREEMARKER_ALLOW_LIST, and GEOSERVER_FREEMARKER_API_EXPOSED. Their defaults restrict objects available to template authors and limit access to getter methods.

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