# CVE-2024-23634: GeoServer arbitrary file renaming vulnerability in REST Coverage/Data Store API

> Authenticated administrators can rename arbitrary files via the REST API, causing denial of service or security bypasses in GeoServer.

- **Severity:** Medium 6.0 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Mar 2024
- **Updated:** 1 Aug 2024
- **Also known as:** GHSA-75m5-hh4r-q9gx

## What is CVE-2024-23634?

CVE-2024-23634 is a medium-severity path traversal vulnerability in geoserver, published on 20 Mar 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. An arbitrary file renaming vulnerability exists in versions prior to 2.23.5 and 2.24.2 that enables an authenticated administrator with permissions to modify stores through the REST Coverage Store or Data Store API to rename arbitrary files and directories with a name that does not end in `.zip`. Store file uploads rename zip files to have a `.zip` extension if it doesn't already have one before unzipping the file.  This is fine for file and url upload methods where the files will be in a specific subdirectory of the data directory but, when using the external upload method, this allows arbitrary files and directories to be renamed. Renaming GeoServer files will most likely result in a denial of service, either completely preventing GeoServer from running or effectively deleting specific resources (such as a workspace, layer or style).  In some cases, renaming GeoServer files could revert to the default settings for that file which could be relatively harmless like removing contact information or have more serious consequences like allowing users to make OGC requests that the customized settings would have prevented them from making. The impact of renaming non-GeoServer files depends on the specific environment although some sort of denial of service is a likely outcome. Versions 2.23.5 and 2.24.2 contain a fix for this issue.

Weakness: CWE-73 (External Control of File Name or Path), CWE-20 (Improper Input Validation)

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

4 open source packages ship an affected version, including org.geoserver:gs-restconfig. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.geoserver:gs-restconfig` | Maven | All versions | 2.23.5 |
| `org.geoserver:gs-restconfig` | Maven | All versions | 2.23.5 |
| `org.geoserver:gs-restconfig` | Maven | From 2.24.0 | 2.24.2 |
| `org.geoserver:gs-restconfig` | Maven | From 2.24.0 | 2.24.2 |

Products: Geoserver Geoserver.

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

Upgrade org.geoserver:gs-restconfig to a fixed version for your release line: 2.23.5 or 2.24.2.

## Is CVE-2024-23634 being exploited?

There is no known exploitation of CVE-2024-23634 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-2024-24749](https://insights.sbomify.com/CVE-2024-24749/): Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat (high 7.5)
- [CVE-2023-41877](https://insights.sbomify.com/CVE-2023-41877/): GeoServer log file path traversal vulnerability (high 7.2)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-23634 is a medium-severity path traversal vulnerability in geoserver, published on 20 Mar 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-23634 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.geoserver:gs-restconfig (Maven): affected all versions; fixed in 2.23.5
- org.geoserver:gs-restconfig (Maven): affected all versions; fixed in 2.23.5
- org.geoserver:gs-restconfig (Maven): affected from 2.24.0; fixed in 2.24.2
- org.geoserver:gs-restconfig (Maven): affected from 2.24.0; fixed in 2.24.2

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-23634/ (Markdown: https://insights.sbomify.com/CVE-2024-23634/index.md)
```

## Sources

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

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