# CVE-2024-34696: GeoServer's Server Status shows sensitive environmental variables and Java properties

> Administrators can view sensitive environment variables and Java properties, including credentials, via the Server Status page or REST API.

- **Severity:** Medium 4.5 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Jul 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-j59v-vgcr-hxvf

## What is CVE-2024-34696?

CVE-2024-34696 is a medium-severity vulnerability in geoserver, published on 1 Jul 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

GeoServer is an open source server that allows users to share and edit geospatial data. Starting in version 2.10.0 and prior to versions 2.24.4 and 2.25.1, GeoServer's Server Status page and REST API lists all environment variables and Java properties to any GeoServer user with administrative rights as part of those modules' status message. These variables/properties can also contain sensitive information, such as database passwords or API keys/tokens. Additionally, many community-developed GeoServer container images `export` other credentials from their start-up scripts as environment variables to the GeoServer (`java`) process. The precise scope of the issue depends on which container image is used and how it is configured.

The `about status` API endpoint which powers the Server Status page is only available to administrators.Depending on the operating environment, administrators might have legitimate access to credentials in other ways, but this issue defeats more sophisticated controls (like break-glass access to secrets or role accounts).By default, GeoServer only allows same-origin authenticated API access. This limits the scope for a third-party attacker to use an administrator’s credentials to gain access to credentials. The researchers who found the vulnerability were unable to determine any other conditions under which the GeoServer REST API may be available more broadly.

Users should update container images to use GeoServer 2.24.4 or 2.25.1 to get the bug fix. As a workaround, leave environment variables and Java system properties hidden by default. Those who provide the option to re-enable it should communicate the impact and risks so that users can make an informed choice.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.geoserver.web:gs-web-app` | Maven | From 2.10.0 | 2.24.4 |
| `org.geoserver.web:gs-web-app` | Maven | From 2.10.0 | 2.24.4 |
| `org.geoserver.web:gs-web-app` | Maven | From 2.25.0 | 2.25.1 |
| `org.geoserver.web:gs-web-app` | Maven | From 2.25.0 | 2.25.1 |
| `org.geoserver:gs-main` | Maven | From 2.10.0 | 2.24.4 |
| `org.geoserver:gs-main` | Maven | From 2.10.0 | 2.24.4 |
| `org.geoserver:gs-main` | Maven | From 2.25.0 | 2.25.1 |
| `org.geoserver:gs-main` | Maven | From 2.25.0 | 2.25.1 |

Products: Geoserver Geoserver.

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

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

## Is CVE-2024-34696 being exploited?

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

What it is: CVE-2024-34696 is a medium-severity vulnerability in geoserver, published on 1 Jul 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-34696 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.geoserver.web:gs-web-app (Maven): affected from 2.10.0; fixed in 2.24.4
- org.geoserver.web:gs-web-app (Maven): affected from 2.10.0; fixed in 2.24.4
- org.geoserver.web:gs-web-app (Maven): affected from 2.25.0; fixed in 2.25.1
- org.geoserver.web:gs-web-app (Maven): affected from 2.25.0; fixed in 2.25.1
- org.geoserver:gs-main (Maven): affected from 2.10.0; fixed in 2.24.4
- org.geoserver:gs-main (Maven): affected from 2.10.0; fixed in 2.24.4
- org.geoserver:gs-main (Maven): affected from 2.25.0; fixed in 2.25.1
- org.geoserver:gs-main (Maven): affected from 2.25.0; fixed in 2.25.1

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

## Sources

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

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