GHSA-wf6j-gr27-g7ch: 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

    Ensure GEOSERVER_FREEMARKER_ALLOW_LIST is set to the default restrictive allow-list of FreeMarker objects for template authors (GeoServer 2.27.0 adds these properties to restrict template author access).

    GeoServer application properties (FreeMarker SSTI protections) GEOSERVER_FREEMARKER_ALLOW_LIST = (default restriction enabled per vendor description)
  6. Configuration

    Ensure GEOSERVER_FREEMARKER_API_EXPOSED is set to the default restrictive set that limits access to getter methods used to access object properties (introduced in GeoServer 2.27.0).

    GeoServer application properties (FreeMarker SSTI protections) GEOSERVER_FREEMARKER_API_EXPOSED = (default restriction enabled per vendor description)
  7. Configuration

    Ensure GEOSERVER_FREEMARKER_BLOCK_LIST is set to the default restrictive block list of sensitive FreeMarker objects (GeoServer 2.27.0 adds this to restrict access despite TemplateUtils.getSafeConfiguration attempts).

    GeoServer application properties (FreeMarker SSTI protections) GEOSERVER_FREEMARKER_BLOCK_LIST = (default restriction enabled per vendor description)

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 issue?

An authenticated GeoServer administrator who can upload FreeMarker templates can exploit it. The vulnerable templates are used by WMS GetFeatureInfo HTML and JSON outputs and WMS GetMap KML and GeoRSS outputs.

2

Is a plain GeoServer installation affected?

Yes. The issue affects a plain GeoServer instance and does not require extensions or community modules.

3

What can successful exploitation allow?

An attacker can execute operating-system commands and read from or write to arbitrary files on the server. This can result in arbitrary code execution and compromise of confidentiality, integrity, and availability.

4

What configuration changes are available in the fixed release?

GeoServer 2.27.0 introduces GEOSERVER_FREEMARKER_BLOCK_LIST, GEOSERVER_FREEMARKER_ALLOW_LIST, and GEOSERVER_FREEMARKER_API_EXPOSED. Their default settings restrict objects accessible 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