# CVE-2024-24749: Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat

> Attackers can read arbitrary classpath resources and potentially gain admin privileges on Windows/Tomcat deployments with embedded data directories.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Jul 2024
- **Updated:** 4 Nov 2025
- **Also known as:** GHSA-jhqx-5v5g-mpf3

## What is CVE-2024-24749?

CVE-2024-24749 is a high-severity path traversal vulnerability in geoserver, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.23.5 and 2.24.3, 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). Versions 2.23.5 and 2.24.3 contain a patch for the issue. Some workarounds are available. One may change from a Windows environment to a Linux environment; or change from Apache Tomcat to Jetty application server. One may also disable anonymous access to the embeded GeoWebCache administration and status pages.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2024-24749?

8 open source packages ship an affected version, including org.geoserver.web:gs-web-app and org.geoserver:gs-gwc. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.geoserver.web:gs-web-app` | Maven | All versions | 2.23.5 |
| `org.geoserver.web:gs-web-app` | Maven | All versions | 2.23.5 |
| `org.geoserver.web:gs-web-app` | Maven | From 2.24.0 | 2.24.3 |
| `org.geoserver.web:gs-web-app` | Maven | From 2.24.0 | 2.24.3 |
| `org.geoserver:gs-gwc` | Maven | All versions | 2.23.5 |
| `org.geoserver:gs-gwc` | Maven | All versions | 2.23.5 |
| `org.geoserver:gs-gwc` | Maven | From 2.24.0 | 2.24.3 |
| `org.geoserver:gs-gwc` | Maven | From 2.24.0 | 2.24.3 |

Products: Geoserver Geoserver.

## How do I fix CVE-2024-24749?

Upgrade org.geoserver.web:gs-web-app to a fixed version for your release line: 2.23.5 or 2.24.3.

## Is CVE-2024-24749 being exploited?

There is no known exploitation of CVE-2024-24749 in the wild and no public exploit code.

## Other vulnerabilities in geoserver

- [CVE-2024-36401](https://insights.sbomify.com/CVE-2024-36401/): OSGeo GeoServer GeoTools Eval Injection (critical 9.8, exploited in the wild)
- [CVE-2025-58360](https://insights.sbomify.com/CVE-2025-58360/): OSGeo GeoServer Improper Restriction of XML External Entity Reference (high 8.2, exploited in the wild)
- [CVE-2023-35042](https://insights.sbomify.com/CVE-2023-35042/): GeoServer RCE due to improper control of generation of code in jai-ext`Jiffle` map algebra language (critical 9.8)
- [CVE-2023-41877](https://insights.sbomify.com/CVE-2023-41877/): GeoServer log file path traversal vulnerability (high 7.2)
- [CVE-2023-51444](https://insights.sbomify.com/CVE-2023-51444/): GeoServer arbitrary file upload vulnerability in REST Coverage Store API (high 7.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-24749 and fix it if it is affected.

What it is: CVE-2024-24749 is a high-severity path traversal vulnerability in geoserver, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-24749 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.geoserver.web:gs-web-app (Maven): affected all versions; fixed in 2.23.5
- org.geoserver.web:gs-web-app (Maven): affected all versions; fixed in 2.23.5
- org.geoserver.web:gs-web-app (Maven): affected from 2.24.0; fixed in 2.24.3
- org.geoserver.web:gs-web-app (Maven): affected from 2.24.0; fixed in 2.24.3
- org.geoserver:gs-gwc (Maven): affected all versions; fixed in 2.23.5
- org.geoserver:gs-gwc (Maven): affected all versions; fixed in 2.23.5
- org.geoserver:gs-gwc (Maven): affected from 2.24.0; fixed in 2.24.3
- org.geoserver:gs-gwc (Maven): affected from 2.24.0; fixed in 2.24.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-24749/ (Markdown: https://insights.sbomify.com/CVE-2024-24749/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-24749
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-24749
- OSV: https://osv.dev/vulnerability/CVE-2024-24749

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-24749/
Summaries are generated and may contain mistakes; the official description above is the record.
