CVE-2024-24749: Gs web app Remote Code Execution Vulnerability
HIGHCVE-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.
CVE-2024-24749 at a Glance
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).
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.
<dependency>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-app</artifactId>
<version>2.23.5</version>
</dependency>
<dependency>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-app</artifactId>
<version>2.24.3</version>
</dependency>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>gs-gwc</artifactId>
<version>2.23.5</version>
</dependency>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>gs-gwc</artifactId>
<version>2.24.3</version>
</dependency>
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
CVE-2024-24749 Affected Gs web app Versions
4 component(s)| 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?
Which Gs web app versions are affected?
What version fixes CVE-2024-24749?
Is gs-web-app affected?
Is gs-gwc affected?
What is the CVSS score of CVE-2024-24749?
What CWE is associated with CVE-2024-24749?
How can I check Maven dependencies for CVE-2024-24749?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}