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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| 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 |
Referencias
- 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
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H- Debilidad (CWE)
CWE-749- Plataforma
- Java / Kotlin (Maven)
- Paquete
org.geoserver:gs-main, org.geoserver:gs-wms, org.geoserver.web:gs-web-app- Publicada
- 19.08.2026
- Actualizado
- 11.10.2026 12:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-wf6j-gr27-g7ch - CC BY 4.0
Historial de vulnerabilidades: org.geoserver:gs-main
Todas las vulnerabilidades publicadas de este paquete (Java / Kotlin (Maven)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 7
- Primera → última
- 04.2022 08.2026
- Sin corrección
- 2
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 4
- Media 3
Divulgaciones por año
- 2022: 2
- 2023: 0
- 2024: 3
- 2025: 0
- 2026: 2
-
GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.