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

Published Jul 1, 2024
·
Updated

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.

Other sources

GeoServer's Server Status page and REST API (at /geoserver/rest/about/status) 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, for example:

Data stores defined with [parameterized catalog settings][catalog] (-DALLOWENVPARAMETRIZATION=true) which need a password or access key.

GeoServer's official Docker image [uses environment variables to configure PostgreSQL JNDI resources, including credentials][docker-jndi] (POSTGRESHOST, POSTGRESUSERNAME, POSTGRESPASSWORD)

Additionally, many community-developed GeoServer container images export other credentials from their start-up scripts as environment variables to the GeoServer (java) process, such as:

GeoServer admin and master (root) passwords

Tomcat management application password

HTTPS/TLS certificate key store password

AWS S3 bucket access keys

The precise scope of the issue depends on which container image is used and how it is configured.

> [!NOTE] > Some container images allow passing secrets as files (eg: POSTGRESPASSWORDFILE), or randomly generating passwords on start-up. While this is promoted as best-practice[^secret-files], if its start-up script [exports these as environment variables][bash-export] to GeoServer, they are also impacted by this issue.

[bash-export]: https://www.gnu.org/software/bash/manual/htmlnode/Bourne-Shell-Builtins.html#index-export [catalog]: https://docs.geoserver.org/latest/en/user/datadirectory/configtemplate.html [docker-jndi]: https://github.com/geoserver/docker/blob/master/README.md#how-to-enable-a-postgresql-jndi-resource

Impact

The “about status” API endpoint (at /geoserver/rest/about/status) 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 (ie: requires XSS).

We were unable to determine any other conditions under which the GeoServer REST API may be available more broadly.

Fixes / remediation

GeoServer 2.24.4 and 2.25.1 hide all environment variables and Java system properties by default, with no further action required by GeoServer administrators.

[There are new settings to allow an administrator to display these again][showing] – effectively reverting this security fix. We strongly recommend administrators leave these settings as-is, and use alternative mechanisms to access environment variables (instructions below).

If you're using GeoServer in a container runtime (such as Docker or Kubernetes) or from some other distributor's packages, you'll need to wait for the maintainer to update the version of GeoServer used in their image.

> [!WARNING] > If you run GeoServer with [parameterized catalog settings][catalog] (-DALLOWENVPARAMETRIZATION=true), a GeoServer administrator could use this to access any environment variable or Java property by including it in some field which is rendered by the UI (such as the description field), even with this fix.

[showing]: https://docs.geoserver.org/latest/en/user/production/config.html#showing-environment-variables-and-java-system-properties

Advice for container / Docker image maintainers

Update container images to use GeoServer 2.24.4 or 2.25.1 to get the bug fix.

Please leave environment variables and Java system properties hidden by default. If you provide the option to re-enable it, [communicate the impact and risks][showing] so that users can make an informed choice.

Container images should practice "defence in depth", to limit the impact when it is configured to show environment variables and/or properties:

Pass secrets to the container as either:

files which are only readable by the GeoServer process/UID, or, references (identifiers) to a secret stored in a cloud provider's metadata or secret management service

Pass secrets to GeoServer by generating configuration files as part of your start-up scripts, rather than passing variables/properties or relying on [parameterized catalog settings][catalog].

Ensure any configuration files with secrets are not readable by other users.

Clear all environment variables which contain secrets before starting GeoServer.

Alternatively: start up GeoServer with only the environment variables it needs, and no secrets.

Don't pass secrets as command-line flags – these are shown in ps to all users!

Alternatives for displaying GeoServer's environment variables

On Linux, you can get all environment variables [set at start-up time][linux-environ] for a running process with:

sh tr '\0' '\n' < /proc/${GEOSERVERPID}/environ

On Windows, [SysInternals' Process Explorer][proc-exp] can show running processes' environment variables.

Current versions of macOS do not allow arbitrary access to other running processes' environment variables. Disabling these restrictions (on a macOS level) would significantly reduce the overall security of the system.

[linux-environ]: https://unix.stackexchange.com/a/70636 [proc-exp]: https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

[^secret-files]: Docker Compose: How to use secrets in Docker Compose, Docker Swarm: Build support for Docker Secrets into your images

GitHub

Affected Software

6 affected componentsFixes available
maven/org.geoserver:gs-main>=2.25.0<2.25.1
2.25.1
maven/org.geoserver:gs-main>=2.10.0<2.24.4
2.24.4
maven/org.geoserver.web:gs-web-app>=2.25.0<2.25.1
2.25.1
maven/org.geoserver.web:gs-web-app>=2.10.0<2.24.4
2.24.4
GeoServer geoserver>=2.10.0<2.24.4
GeoServer geoserver>=2.25.0<2.25.1

Event History

Jul 1, 2024
CVE Published
via MITRE·02:36 PM
Data Sourced
via MITRE·02:36 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:20 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-34696?

CVE-2024-34696 has been classified with a severity rating that indicates a potential exposure of sensitive data due to the disclosure of environment variables and Java properties.

2

How do I fix CVE-2024-34696?

To resolve CVE-2024-34696, update GeoServer to version 2.24.4 or 2.25.1 or later.

3

Which versions of GeoServer are affected by CVE-2024-34696?

CVE-2024-34696 affects GeoServer versions from 2.10.0 up to but not including 2.24.4 and 2.25.1.

4

What impact does CVE-2024-34696 have on GeoServer installations?

The impact of CVE-2024-34696 allows unauthorized users to access environment variables and Java properties, potentially leading to sensitive information exposure.

5

Is there a workaround for CVE-2024-34696?

There is no specific workaround for CVE-2024-34696; the only way to mitigate risk is to upgrade to the patched versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203