CVE-2024-24749 Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat

High 7.5 Published Updated

Attackers can read arbitrary classpath resources and potentially gain admin privileges on Windows/Tomcat deployments with embedded data directories.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-24749?

CVE-2024-24749 is a high-severity path traversal vulnerability in geoserver, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.23.5 and 2.24.3, if GeoServer is deployed in the Windows operating system using an Apache Tomcat web application server, it is possible to bypass existing input validation in the GeoWebCache ByteStreamController class and read arbitrary classpath resources with specific file name extensions. If GeoServer is also deployed as a web archive using the data directory embedded in the `geoserver.war` file (rather than an external data directory), it will likely be possible to read specific resources to gain administrator privileges. However, it is very unlikely that production environments will be using the embedded data directory since, depending on how GeoServer is deployed, it will be erased and re-installed (which would also reset to the default password) either every time the server restarts or every time a new GeoServer WAR is installed and is therefore difficult to maintain. An external data directory will always be used if GeoServer is running in standalone mode (via an installer or a binary). Versions 2.23.5 and 2.24.3 contain a patch for the issue. Some workarounds are available. One may change from a Windows environment to a Linux environment; or change from Apache Tomcat to Jetty application server. One may also disable anonymous access to the embeded GeoWebCache administration and status pages.

Weakness: CWE-22

Which versions are affected by CVE-2024-24749?

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

PackageAffectedFixed in
org.geoserver.web:gs-web-app MavenAll versions2.23.5
org.geoserver.web:gs-web-app MavenAll versions2.23.5
org.geoserver.web:gs-web-app MavenFrom 2.24.02.24.3
org.geoserver.web:gs-web-app MavenFrom 2.24.02.24.3
org.geoserver:gs-gwc MavenAll versions2.23.5
org.geoserver:gs-gwc MavenAll versions2.23.5
2 more packages
org.geoserver:gs-gwc MavenFrom 2.24.02.24.3
org.geoserver:gs-gwc MavenFrom 2.24.02.24.3

Products include Geoserver Geoserver.

How do I fix CVE-2024-24749?

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

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-24749 being exploited?

There is no known exploitation of CVE-2024-24749 in the wild and no public exploit code.

Sources

Also known as GHSA-jhqx-5v5g-mpf3.

Is CVE-2024-24749 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free