Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Maven
Not in CISA KEV
HIGH severity

CVE-2024-45747

HIGHFix: geoserver/geoserver#8164

CVE-2024-45747 is a high-severity (CVSS 7.2) remote code execution vulnerability in org.geoserver:gs-main. O3 Security confirms whether CVE-2024-45747 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

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

Published
Aug 19, 2026
Updated
Aug 19, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Aug 19, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

3 pkgs affected
org.geoserver:gs-mainorg.geoserver:gs-wmsorg.geoserver.web:gs-web-app

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

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_LIST
  • GEOSERVER_FREEMARKER_ALLOW_LIST
  • GEOSERVER_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.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
Mavenorg.geoserver:gs-mainall versions2.27.0
Mavenorg.geoserver:gs-wmsall versions2.27.0
Mavenorg.geoserver.web:gs-web-appall versions2.27.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.geoserver:gs-main. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update org.geoserver:gs-main to 2.27.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-45747 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2024-45747 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2024-45747. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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.Exec
O3 Security · Impact-Aware SCA

Is CVE-2024-45747 in your dependencies?

O3 detects CVE-2024-45747 across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.