Vulnerabilities in pkg:maven/org.geoserver.web/gs-web-app

PACKAGE
Advisory Identifier: GHSA-wf6j-gr27-g7ch
Advisory Summary

CVE-2024-45747 is a HIGH (CVSS 7.2) geoserver has a server-side template vulnerability (CWE-749: Exposed Dangerous Method or Function) affecting Gs main libraries in the Maven ecosystem. The issue involves geoserver has a server-side template injection (ssti) vulnerability in processing freemarker templates. Remediation is available by upgrading affected packages to version 2.27.0.

17 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.geoserver.web/gs-web-app

17 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.geoserver.web/gs-web-app. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-wf6j-gr27-g7ch CVE-2024-45747 HIGH GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates
GHSA-7qmg-grcp-qf25 CVE-2025-52465 HIGH GeoServer has an arbitrary file write vulnerability in its Master Password Dump Page
GHSA-x4r9-gmw3-hxww CVE-2025-58175 MODERATE GeoServer has a Server-Side Request Forgery (SSRF) Vulnerability in its XML Entity Resolution
GHSA-fjf5-xgmq-5525 CVE-2025-58360 HIGH GeoServer is vulnerable to Unauthenticated XML External Entities (XXE) attack via WMS GetMap feature
GHSA-w66h-j855-qr72 CVE-2025-21621 MODERATE GeoServer has a Reflected Cross-Site Scripting (XSS) vulnerability in its WMS GetFeatureInfo HTML format
GHSA-jhqx-5v5g-mpf3 CVE-2024-24749 HIGH Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat
GHSA-6jj6-gm7p-fcvv CVE-2024-36401 CRITICAL Remote Code Execution (RCE) vulnerability in geoserver
GHSA-jj54-8f66-c5pc CVE-2025-30220 HIGH [XBOW-025-068] XML External Entity (XXE) Processing Vulnerability in GeoServer WFS Service
GHSA-gr67-pwcv-76gf CVE-2025-30145 HIGH GeoServer Infinite Loop Vulnerability in Jiffle process
GHSA-h86g-x8mm-78m5 CVE-2025-27505 MODERATE GeoServer Missing Authorization on REST API Index
GHSA-r4hf-r8gj-jgw2 CVE-2024-40625 MODERATE Coverage REST API Server Side Request Forgery
GHSA-jm79-7xhw-6f6f CVE-2024-38524 MODERATE GWC Home Page communicate version and revision information
GHSA-mc43-4fqr-c965 CVE-2024-34711 CRITICAL GeoServer has improper ENTITY_RESOLUTION_ALLOWLIST URI validation in XML Processing (SSRF)
GHSA-6pfc-w86r-54q6 CVE-2024-35230 MODERATE Welcome and About GeoServer pages communicate version and revision information
GHSA-8hmh-mhqv-7638 CVE-2008-7227 MODERATE PartialBufferOutputStream2 flush issues
GHSA-j59v-vgcr-hxvf CVE-2024-34696 MODERATE GeoServer's Server Status shows sensitive environmental variables and Java properties
GHSA-cqpc-x2c6-2gmf CVE-2023-41339 MODERATE Unsecured WMS dynamic styling sld=<url> parameter affords blind unauthenticated SSRF

CVE-2024-45747 at a Glance

CVE Identifier CVE-2024-45747
GHSA Identifier GHSA-wf6j-gr27-g7ch
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-749: Exposed Dangerous Method or Function
Affected Product Gs main
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-45747

To remediate this vulnerability, upgrade all affected Gs main dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.geoserver:gs-main fixed: 2.27.0
<dependency>
    <groupId>org.geoserver</groupId>
    <artifactId>gs-main</artifactId>
    <version>2.27.0</version>
</dependency>
org.geoserver:gs-wms fixed: 2.27.0
<dependency>
    <groupId>org.geoserver</groupId>
    <artifactId>gs-wms</artifactId>
    <version>2.27.0</version>
</dependency>
org.geoserver.web:gs-web-app fixed: 2.27.0
<dependency>
    <groupId>org.geoserver.web</groupId>
    <artifactId>gs-web-app</artifactId>
    <version>2.27.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.geoserver

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-45747, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.geoserver

Analyze the terminal output to locate any version of Gs main in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.27.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.geoserver command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-749: Exposed Dangerous Method or Function, where the product provides an applications programming interface (api) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted. In Gs main, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2024-45747 Affected Gs main Versions

3 component(s)
Fixed Versions:
2.27.0
Product / Package Ecosystem Affected Versions Fixed Version
org.geoserver:gs-main
Maven
< 2.27.0
2.27.0
org.geoserver:gs-wms
Maven
< 2.27.0
2.27.0
org.geoserver.web:gs-web-app
Maven
< 2.27.0
2.27.0

References

Frequently Asked Questions

What is CVE-2024-45747?
CVE-2024-45747 is a security vulnerability in Gs main involving GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates under CWE-749: Exposed Dangerous Method or Function.
Which Gs main versions are affected?
Affected versions include releases prior to 2.27.0 across affected packages: org.geoserver:gs-main, org.geoserver:gs-wms, org.geoserver.web:gs-web-app.
What version fixes CVE-2024-45747?
Upgrading to 2.27.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gs-main affected?
Yes, org.geoserver:gs-main is affected in releases prior to 2.27.0. Upgrade your dependency to 2.27.0 or later.
Is gs-wms affected?
Yes, org.geoserver:gs-wms is affected in releases prior to 2.27.0. Upgrade your dependency to 2.27.0 or later.
What is the CVSS score of CVE-2024-45747?
CVE-2024-45747 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-45747?
CVE-2024-45747 is classified under CWE-749: Exposed Dangerous Method or Function (The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.).
How can I check Maven dependencies for CVE-2024-45747?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.geoserver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wf6j-gr27-g7ch",
  "modified" : "2026-08-19T19:31:54Z",
  "published" : "2026-08-19T19:31:54Z",
  "aliases" : [ "CVE-2024-45747" ],
  "summary" : "GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates",
  "details" : "### Summary\nA 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.\n\n### Details\nThe 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.\n\n### Impact\nThis vulnerability can lead to executing arbitrary code and reading and writing arbitrary files.\n\n### Resolution\nGeoServer 2.27.0 addresses this vulnerability with several new application properties:\n\n* ``GEOSERVER_FREEMARKER_BLOCK_LIST``\n* ``GEOSERVER_FREEMARKER_ALLOW_LIST``\n* ``GEOSERVER_FREEMARKER_API_EXPOSED``\n\nThese application properties default to restricting the objects template authors can access, and limit access to \"getter\" methods used to access object properties.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver:gs-main"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver:gs-wms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver.web:gs-web-app"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/geoserver/geoserver/security/advisories/GHSA-wf6j-gr27-g7ch"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/geoserver/geoserver/pull/8164"
  }, {
    "type" : "WEB",
    "url" : "https://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/html/#accessing-instance-methods"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/geoserver/geoserver"
  }, {
    "type" : "WEB",
    "url" : "https://osgeo-org.atlassian.net/browse/GEOS-11645"
  }, {
    "type" : "WEB",
    "url" : "https://osgeo-org.atlassian.net/browse/GEOS-11777"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-749" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-19T19:31:54Z",
    "nvd_published_at" : null
  }
}