high

CVE-2024-45747

Maven · org.geoserver:gs-main

Summary

GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates

Severity
high
CVSS
7.2
CWE
CWE-749
Also known as
GHSA-wf6j-gr27-g7ch#org.geoserver:gs-main
Published
2026-08-19
Updated
2026-08-19

Advisory details

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:

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

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.