Vulnerabilities in pkg:maven/org.geoserver/gs-gwc

PACKAGE
Advisory Identifier: GHSA-jhqx-5v5g-mpf3
Advisory Summary

CVE-2024-24749 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Gs web app libraries in the Maven ecosystem. The issue involves classpath resource disclosure in gwc web resource api on windows / tomcat. Remediation is available by upgrading affected packages to version 2.23.5, 2.24.3.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.geoserver/gs-gwc

3 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-jhqx-5v5g-mpf3 CVE-2024-24749 HIGH Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat
GHSA-jm79-7xhw-6f6f CVE-2024-38524 MODERATE GWC Home Page communicate version and revision information
GHSA-88wc-fcj9-q3r9 CVE-2024-23821 MODERATE GeoServer's GWC Demos Page vulnerable to Stored Cross-Site Scripting (XSS)

CVE-2024-24749 at a Glance

CVE Identifier CVE-2024-24749
GHSA Identifier GHSA-jhqx-5v5g-mpf3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Gs web app
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2024-24749

To remediate this vulnerability, upgrade all affected Gs web app 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.web:gs-web-app fixed: 2.23.5
<dependency>
    <groupId>org.geoserver.web</groupId>
    <artifactId>gs-web-app</artifactId>
    <version>2.23.5</version>
</dependency>
org.geoserver.web:gs-web-app fixed: 2.24.3
<dependency>
    <groupId>org.geoserver.web</groupId>
    <artifactId>gs-web-app</artifactId>
    <version>2.24.3</version>
</dependency>
org.geoserver:gs-gwc fixed: 2.23.5
<dependency>
    <groupId>org.geoserver</groupId>
    <artifactId>gs-gwc</artifactId>
    <version>2.23.5</version>
</dependency>
org.geoserver:gs-gwc fixed: 2.24.3
<dependency>
    <groupId>org.geoserver</groupId>
    <artifactId>gs-gwc</artifactId>
    <version>2.24.3</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.web

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.geoserver.web

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

Note: The mvn dependency:tree -Dincludes=org.geoserver.web 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Gs web app, 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

### Impact If GeoServer is deployed in the Windows operating system using an Apache Tomcat web application server, it is possible to bypass existing input validation in the GeoWebCache ByteStreamController class and read arbitrary classpath resources with specific file name extensions. If GeoServer is also deployed as a web archive using the data directory embedded in the geoserver.war file (rather than an external data directory), it will likely be possible to read specific resources to gain administrator privileges. However, it is very unlikely that production environments will be using the embedded data directory since, depending on how GeoServer is deployed, it will be erased and re-installed (which would also reset to the default password) either every time the server restarts or every time a new GeoServer WAR is installed and is therefore difficult to maintain. An external data directory will always be used if GeoServer is running in standalone mode (via an installer or a binary). ### Patches https://github.com/GeoWebCache/geowebcache/pull/1211 ### Workarounds Change environment: * Change from Windows operating system. This vulnerability depends on Windows file paths so Linux and Mac OS are not vulnerable. * Change from Apache Tomcat application server. Jetty and WildFly are confirmed to not be vulnerable. Other application servers have not been tested and may be vulnerable. Disable anonymous access to the embeded GeoWebCache administration and status pages: 1. Navigate to **Security > Authentication** Page 2. Locate **Filter Chains** heading 3. Select the ``web`` filter filter chain (ant pattern ``/web/**,/gwc/rest/web/**,/``) 4. Remove ``,/gwc/rest/web/**`` from the pattern (so that ``/web/**,/`` is left). 5. Save the changes ### References * CVE-Pending

CVE-2024-24749 Affected Gs web app Versions

4 component(s)
Fixed Versions:
2.23.52.24.3
Product / Package Ecosystem Affected Versions Fixed Version
org.geoserver.web:gs-web-app
Maven
< 2.23.5
2.23.5
org.geoserver.web:gs-web-app
Maven
≥ 2.24.0
< 2.24.3
2.24.3
org.geoserver:gs-gwc
Maven
< 2.23.5
2.23.5
org.geoserver:gs-gwc
Maven
≥ 2.24.0
< 2.24.3
2.24.3

References

Frequently Asked Questions

What is CVE-2024-24749?
CVE-2024-24749 is a security vulnerability in Gs web app involving Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Gs web app versions are affected?
Affected versions include releases prior to 2.23.5, 2.24.3 across affected packages: org.geoserver.web:gs-web-app, org.geoserver:gs-gwc.
What version fixes CVE-2024-24749?
Upgrading to 2.23.5, 2.24.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gs-web-app affected?
Yes, org.geoserver.web:gs-web-app is affected in releases prior to 2.23.5, 2.24.3. Upgrade your dependency to 2.23.5, 2.24.3 or later.
Is gs-gwc affected?
Yes, org.geoserver:gs-gwc is affected in releases prior to 2.23.5, 2.24.3. Upgrade your dependency to 2.23.5, 2.24.3 or later.
What is the CVSS score of CVE-2024-24749?
CVE-2024-24749 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-24749?
CVE-2024-24749 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Maven dependencies for CVE-2024-24749?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.geoserver.web'. 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-jhqx-5v5g-mpf3",
  "modified" : "2025-11-04T22:15:29Z",
  "published" : "2024-07-01T19:24:04Z",
  "aliases" : [ "CVE-2024-24749" ],
  "summary" : "Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat",
  "details" : "### Impact\n\nIf GeoServer is deployed in the Windows operating system using an Apache Tomcat web application server, it is possible to bypass existing input validation in the GeoWebCache ByteStreamController class and read arbitrary classpath resources with specific file name extensions.\n\nIf GeoServer is also deployed as a web archive using the data directory embedded in the geoserver.war file (rather than an external data directory), it will likely be possible to read specific resources to gain administrator privileges.  However, it is very unlikely that production environments will be using the embedded data directory since, depending on how GeoServer is deployed, it will be erased and re-installed (which would also reset to the default password) either every time the server restarts or every time a new GeoServer WAR is installed and is therefore difficult to maintain. An external data directory will always be used if GeoServer is running in standalone mode (via an installer or a binary).\n\n### Patches\n\nhttps://github.com/GeoWebCache/geowebcache/pull/1211\n\n### Workarounds\n\nChange environment:\n\n* Change from Windows operating system. This vulnerability depends on Windows file paths so Linux and Mac OS are not vulnerable.\n* Change from Apache Tomcat application server. Jetty and WildFly are confirmed to not be vulnerable. Other application servers have not been tested and may be vulnerable.\n\nDisable anonymous access to the embeded GeoWebCache administration and status pages:\n\n1. Navigate to **Security > Authentication** Page\n2. Locate **Filter Chains** heading\n3. Select the ``web`` filter filter chain (ant pattern ``/web/**,/gwc/rest/web/**,/``)\n4. Remove ``,/gwc/rest/web/**`` from the pattern (so that ``/web/**,/`` is left).\n5. Save the changes\n\n### References\n\n* CVE-Pending",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver.web:gs-web-app"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.23.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver.web:gs-web-app"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.24.0"
      }, {
        "fixed" : "2.24.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver:gs-gwc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.23.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver:gs-gwc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.24.0"
      }, {
        "fixed" : "2.24.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/geoserver/geoserver/security/advisories/GHSA-jhqx-5v5g-mpf3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-24749"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/GeoWebCache/geowebcache/pull/1211"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/GeoWebCache/geowebcache/commit/c7f76bd8a1d67c3b986146e7a5e0b14dd64a8fef"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/geoserver/geoserver"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2024/Feb/13"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-01T19:24:04Z",
    "nvd_published_at" : "2024-07-01T14:15:05Z"
  }
}