GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates
CVE-2024-45747GHSA-wf6j-gr27-g7ch
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (org.geoserver:gs-main 2.27.0; org.geoserver.web:gs-web-app 2.27.0; org.geoserver:gs-wms 2.27.0), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
Maven org.geoserver:gs-main
- Affected
- < 2.27.0
- Fixed in
- 2.27.0
Maven org.geoserver.web:gs-web-app
- Affected
- < 2.27.0
- Fixed in
- 2.27.0
Maven org.geoserver:gs-wms
- Affected
- < 2.27.0
- Fixed in
- 2.27.0
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-wf6j-gr27-g7ch lists affected ranges: Maven org.geoserver:gs-main >=0 =0 =0 <2.27.0 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-wf6j-gr27-g7ch lists affected ranges: Maven org.geoserver:gs-main >=0 =0 =0 <2.27.0
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 7.2 · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
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…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 2 · amended ·
Amended from ghsa record GHSA-wf6j-gr27-g7ch
- Revision 1 · created ·
Published from osv record GHSA-wf6j-gr27-g7ch
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2024-45747 Advisory: GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates IDs: CVE-2024-45747, GHSA-wf6j-gr27-g7ch Record: https://patchnext.com/advisories/cve-2024-45747 (revision 2, source checked 26 Oct 2026, 16:54 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.2) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: org.geoserver:gs-main 2.27.0; org.geoserver.web:gs-web-app 2.27.0; org.geoserver:gs-wms 2.27.0. A vendor fix does not mean a deployment is fixed. ## Affected components - Maven org.geoserver:gs-main: affected < 2.27.0; fixed in 2.27.0 - Maven org.geoserver.web:gs-web-app: affected < 2.27.0; fixed in 2.27.0 - Maven org.geoserver:gs-wms: affected < 2.27.0; fixed in 2.27.0 ## Suggested inspection (read-only) - Maven org.geoserver:gs-main: check the installed version with your package manager. - Maven org.geoserver.web:gs-web-app: check the installed version with your package manager. - Maven org.geoserver:gs-wms: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on org.geoserver:gs-main, org.geoserver.web:gs-web-app, org.geoserver:gs-wms. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/GHSA-wf6j-gr27-g7ch (OSV record GHSA-wf6j-gr27-g7ch lists affected ranges: Maven org.geoserver:gs-main >=0 =0 =0 <2.27.0 (fixed)) - Verified: https://github.com/advisories/GHSA-wf6j-gr27-g7ch (GitHub-reviewed advisory GHSA-wf6j-gr27-g7ch lists affected ranges: Maven org.geoserver:gs-main >=0 =0 =0 <2.27.0) Commands are suggestions: review each one before running it.
Loading voting…