# CVE-2023-41877: GeoServer log file path traversal vulnerability

> GeoServer administrators can exploit path traversal in log settings to read arbitrary files, requiring admin access and specific configuration.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 20 Mar 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-8g7v-vjrc-x4g5

## What is CVE-2023-41877?

CVE-2023-41877 is a high-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. A path traversal vulnerability in versions 2.23.4 and prior requires GeoServer Administrator with access to the admin console to misconfigure the Global Settings for log file location to an arbitrary location. The admin console GeoServer Logs page provides a preview of these contents. As this issue requires GeoServer administrators access, often representing a trusted party, the vulnerability has not received a patch as of time of publication. As a workaround, a system administrator responsible for running GeoServer can use the `GEOSERVER_LOG_FILE` setting to override any configuration option provided by the Global Settings page. The `GEOSERVER_LOG_LOCATION` parameter can be set as system property, environment variables, or servlet context parameters.

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

## Which versions are affected by CVE-2023-41877?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.geoserver:gs-main` | Maven | All versions to 2.23.4 | None |
| `org.geoserver:gs-main` | Maven | All versions to 2.23.4 | None |

Products: Geoserver Geoserver.

## How do I fix CVE-2023-41877?

No fix has been published for CVE-2023-41877 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-41877 being exploited?

There is no known exploitation of CVE-2023-41877 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-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-2023-41877 and fix it if it is affected.

What it is: CVE-2023-41877 is a high-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-2023-41877 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.geoserver:gs-main (Maven): affected all versions up to 2.23.4; no fix listed
- org.geoserver:gs-main (Maven): affected all versions up to 2.23.4; no fix listed

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

## Sources

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

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