GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates
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:
GEOSERVER_FREEMARKER_BLOCK_LISTGEOSERVER_FREEMARKER_ALLOW_LISTGEOSERVER_FREEMARKER_API_EXPOSED
These application properties default to restricting the objects template authors can access, and limit access to "getter" methods used to access object properties.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.geoserver:gs-main | < 2.27.0 | 2.27.0 |
| Java / Kotlin (Maven) | org.geoserver:gs-wms | < 2.27.0 | 2.27.0 |
| Java / Kotlin (Maven) | org.geoserver.web:gs-web-app | < 2.27.0 | 2.27.0 |
Verweise
- https://github.com/geoserver/geoserver/security/advisories/GHSA-wf6j-gr27-g7ch
- https://github.com/geoserver/geoserver/pull/8164
- https://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/html/#accessing-instance-methods
- https://github.com/geoserver/geoserver
- https://osgeo-org.atlassian.net/browse/GEOS-11645
- https://osgeo-org.atlassian.net/browse/GEOS-11777
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H- Schwäche (CWE)
CWE-749- Plattform
- Java / Kotlin (Maven)
- Paket
org.geoserver:gs-main, org.geoserver:gs-wms, org.geoserver.web:gs-web-app- Veröffentlicht
- 19.08.2026
- Aktualisiert
- 11.10.2026 12:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-wf6j-gr27-g7ch - CC BY 4.0
Schwachstellenhistorie: org.geoserver:gs-main
Alle veröffentlichten Schwachstellen dieses Pakets (Java / Kotlin (Maven)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 7
- Erste → letzte
- 04.2022 08.2026
- Ohne Fix
- 2
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 4
- Mittel 3
Veröffentlichungen pro Jahr
- 2022: 2
- 2023: 0
- 2024: 3
- 2025: 0
- 2026: 2
-
GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.