CVE-2024-34696: Gs web app GeoServer's Server Status Shows Sensitive Vulnerability

MODERATE
Advisory Identifier: GHSA-j59v-vgcr-hxvf
CVSS 4.5
CWE-200
Published
Advisory Summary

CVE-2024-34696 is a MODERATE (CVSS 4.5) geoserver's server status shows sensitive vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Gs web app libraries in the Maven ecosystem. The issue involves geoserver's server status shows sensitive environmental variables and java properties. Remediation is available by upgrading affected packages to version 2.24.4, 2.25.1.

CVE-2024-34696 at a Glance

CVE Identifier CVE-2024-34696
GHSA Identifier GHSA-j59v-vgcr-hxvf
Severity MODERATE
CVSS v3.1 Base Score 4.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Gs web app
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-34696

To remediate this vulnerability, upgrade all affected Gs web app dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.geoserver.web:gs-web-app fixed: 2.24.4
<dependency>
    <groupId>org.geoserver.web</groupId>
    <artifactId>gs-web-app</artifactId>
    <version>2.24.4</version>
</dependency>
org.geoserver.web:gs-web-app fixed: 2.25.1
<dependency>
    <groupId>org.geoserver.web</groupId>
    <artifactId>gs-web-app</artifactId>
    <version>2.25.1</version>
</dependency>
org.geoserver:gs-main fixed: 2.24.4
<dependency>
    <groupId>org.geoserver</groupId>
    <artifactId>gs-main</artifactId>
    <version>2.24.4</version>
</dependency>
org.geoserver:gs-main fixed: 2.25.1
<dependency>
    <groupId>org.geoserver</groupId>
    <artifactId>gs-main</artifactId>
    <version>2.25.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.geoserver.web

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-34696, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.geoserver.web

Analyze the terminal output to locate any version of Gs web app in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.24.4), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.geoserver.web command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Gs web app, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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] (`-DALLOW_ENV_PARAMETRIZATION=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] (`POSTGRES_HOST`, `POSTGRES_USERNAME`, `POSTGRES_PASSWORD`) 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: `POSTGRES_PASSWORD_FILE`), or randomly generating passwords on start-up. While this is promoted as best-practice[^secret-files], if its start-up script [`export`s these as environment variables][bash-export] to GeoServer, they are **also** impacted by this issue. [bash-export]: https://www.gnu.org/software/bash/manual/html_node/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] (`-DALLOW_ENV_PARAMETRIZATION=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/${GEOSERVER_PID}/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](https://docs.docker.com/compose/use-secrets/), [Docker Swarm: Build support for Docker Secrets into your images](https://docs.docker.com/engine/swarm/secrets/#build-support-for-docker-secrets-into-your-images)

CVE-2024-34696 Affected Gs web app Versions

4 component(s)
Fixed Versions:
2.24.42.25.1
Product / Package Ecosystem Affected Versions Fixed Version
org.geoserver.web:gs-web-app
Maven
≥ 2.10.0
< 2.24.4
2.24.4
org.geoserver.web:gs-web-app
Maven
≥ 2.25.0
< 2.25.1
2.25.1
org.geoserver:gs-main
Maven
≥ 2.10.0
< 2.24.4
2.24.4
org.geoserver:gs-main
Maven
≥ 2.25.0
< 2.25.1
2.25.1

References

Frequently Asked Questions

What is CVE-2024-34696?
CVE-2024-34696 is a security vulnerability in Gs web app involving GeoServer's Server Status shows sensitive environmental variables and Java properties under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Gs web app versions are affected?
Affected versions include releases prior to 2.24.4, 2.25.1 across affected packages: org.geoserver.web:gs-web-app, org.geoserver:gs-main.
What version fixes CVE-2024-34696?
Upgrading to 2.24.4, 2.25.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gs-web-app affected?
Yes, org.geoserver.web:gs-web-app is affected in releases prior to 2.24.4, 2.25.1. Upgrade your dependency to 2.24.4, 2.25.1 or later.
Is gs-main affected?
Yes, org.geoserver:gs-main is affected in releases prior to 2.24.4, 2.25.1. Upgrade your dependency to 2.24.4, 2.25.1 or later.
What is the CVSS score of CVE-2024-34696?
CVE-2024-34696 has a CVSS v3.1 base score of 4.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-34696?
CVE-2024-34696 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Maven dependencies for CVE-2024-34696?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.geoserver.web'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j59v-vgcr-hxvf",
  "modified" : "2024-07-01T19:20:57Z",
  "published" : "2024-07-01T19:20:57Z",
  "aliases" : [ "CVE-2024-34696" ],
  "summary" : " GeoServer's Server Status shows sensitive environmental variables and Java properties",
  "details" : "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.\n\nThese variables/properties can also contain sensitive information, such as database passwords or API keys/tokens, for example:\n\n* Data stores defined with [parameterized catalog settings][catalog] (`-DALLOW_ENV_PARAMETRIZATION=true`) which need a password or access key.\n\n* GeoServer's official Docker image [uses environment variables to configure PostgreSQL JNDI resources, including credentials][docker-jndi] (`POSTGRES_HOST`, `POSTGRES_USERNAME`, `POSTGRES_PASSWORD`)\n\nAdditionally, many community-developed GeoServer container images `export` other credentials from their start-up scripts as environment variables to the GeoServer (`java`) process, such as:\n\n* GeoServer `admin` and master (`root`) passwords\n\n* Tomcat management application password\n\n* HTTPS/TLS certificate key store password\n\n* AWS S3 bucket access keys\n\nThe precise scope of the issue depends on which container image is used and how it is configured.\n\n> [!NOTE]\n> Some container images allow passing secrets as files (eg: `POSTGRES_PASSWORD_FILE`), or randomly generating passwords on start-up. While this is promoted as best-practice[^secret-files], if its start-up script [`export`s these as environment variables][bash-export] to GeoServer, they are **also** impacted by this issue.\n\n[bash-export]: https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html#index-export\n[catalog]: https://docs.geoserver.org/latest/en/user/datadirectory/configtemplate.html\n[docker-jndi]: https://github.com/geoserver/docker/blob/master/README.md#how-to-enable-a-postgresql-jndi-resource\n\n### Impact\n\nThe “about status” API endpoint (at `/geoserver/rest/about/status`) which powers the Server Status page is only available to administrators.\n\nDepending 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).\n\nBy 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).\n\nWe were unable to determine any other conditions under which the GeoServer REST API may be available more broadly.\n\n### Fixes / remediation\n\nGeoServer 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*.\n\n[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).\n\nIf 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.\n\n> [!WARNING]\n> If you run GeoServer with [parameterized catalog settings][catalog] (`-DALLOW_ENV_PARAMETRIZATION=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**.\n\n[showing]: https://docs.geoserver.org/latest/en/user/production/config.html#showing-environment-variables-and-java-system-properties\n\n### Advice for container / Docker image maintainers\n\nUpdate container images to use GeoServer 2.24.4 or 2.25.1 to get the bug fix.\n\nPlease 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.\n\nContainer images should practice \"defence in depth\", to limit the impact when it is configured to show environment variables and/or properties:\n\n* Pass secrets to the container as either:\n\n  * files which are only readable by the GeoServer process/UID, or,\n  * references (identifiers) to a secret stored in a cloud provider's metadata or secret management service\n\n* 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].\n\n* Ensure any configuration files with secrets are not readable by other users.\n\n* Clear all environment variables which contain secrets _before_ starting GeoServer.\n\n  _Alternatively:_ start up GeoServer with *only* the environment variables it needs, and no secrets.\n\n* **Don't** pass secrets as command-line flags – these are shown in `ps` to all users!\n\n### Alternatives for displaying GeoServer's environment variables\n\n* **On Linux,** you can get all environment variables [set at _start-up time_][linux-environ] for a running process with:\n\n  ```sh\n  tr '\\0' '\\n' < /proc/${GEOSERVER_PID}/environ\n  ```\n\n* **On Windows,** [SysInternals' Process Explorer][proc-exp] can show running processes' environment variables.\n\n* 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.\n\n[linux-environ]: https://unix.stackexchange.com/a/70636\n[proc-exp]: https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer\n\n[^secret-files]: [Docker Compose: How to use secrets in Docker Compose](https://docs.docker.com/compose/use-secrets/), [Docker Swarm: Build support for Docker Secrets into your images](https://docs.docker.com/engine/swarm/secrets/#build-support-for-docker-secrets-into-your-images)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver.web:gs-web-app"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.24.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver.web:gs-web-app"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.25.0"
      }, {
        "fixed" : "2.25.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver:gs-main"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.24.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geoserver:gs-main"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.25.0"
      }, {
        "fixed" : "2.25.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/geoserver/geoserver/security/advisories/GHSA-j59v-vgcr-hxvf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34696"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/geoserver/geoserver"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-01T19:20:57Z",
    "nvd_published_at" : "2024-07-01T15:15:16Z"
  }
}