CVE-2024-23634: Gs restconfig GeoServer Arbitrary File Renaming Vulnerability Vulnerability
MODERATECVE-2024-23634 is a MODERATE (CVSS 6.0) geoserver arbitrary file renaming vulnerability vulnerability (CWE-20: Improper Input Validation) affecting Gs restconfig libraries in the Maven ecosystem. The issue involves geoserver arbitrary file renaming vulnerability in rest coverage/data store api. Remediation is available by upgrading affected packages to version 2.23.5, 2.24.2.
CVE-2024-23634 at a Glance
Security Impact
CVSS: 6.0
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:N/S:U/C:L/I:L/A:H).
How to Fix CVE-2024-23634
To remediate this vulnerability, upgrade all affected Gs restconfig dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>gs-restconfig</artifactId>
<version>2.23.5</version>
</dependency>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>gs-restconfig</artifactId>
<version>2.24.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.geoserver
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-23634, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.geoserver
Analyze the terminal output to locate any version of Gs restconfig in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.23.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.geoserver 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Gs restconfig, 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
CVE-2024-23634 Affected Gs restconfig Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.geoserver:gs-restconfig
|
Maven |
< 2.23.5
|
2.23.5
|
|
org.geoserver:gs-restconfig
|
Maven |
≥ 2.24.0
< 2.24.2
|
2.24.2
|
References
Frequently Asked Questions
What is CVE-2024-23634?
Which Gs restconfig versions are affected?
What version fixes CVE-2024-23634?
Is gs-restconfig affected?
What is the CVSS score of CVE-2024-23634?
What CWE is associated with CVE-2024-23634?
How can I check Maven dependencies for CVE-2024-23634?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-75m5-hh4r-q9gx",
"modified" : "2024-03-20T21:04:06Z",
"published" : "2024-03-20T15:01:48Z",
"aliases" : [ "CVE-2024-23634" ],
"summary" : "GeoServer Arbitrary file renaming vulnerability in REST Coverage/Data Store API",
"details" : "### Summary\nAn arbitrary file renaming vulnerability exists that enables an authenticated administrator with permissions to modify stores through the REST Coverage Store or Data Store API to rename arbitrary files and directories with a name that does not end in \".zip\".\n\n### Details\nStore file uploads rename zip files to have a \".zip\" extension if it doesn't already have one before unzipping the file. This is fine for file and url upload methods where the files will be in a specific subdirectory of the data directory but, when using the external upload method, this allows arbitrary files and directories to be renamed.\n\n### PoC\nCoverage Store Example (workspace and store name are irrelevant and any valid coverage format can be used):\ncurl -XPUT -H\"Content-Type:application/zip\" -u\"admin:geoserver\" -d\"/file/to/move\" \"http://localhost:8080/geoserver/rest/workspaces/a/coveragestores/b/external.geotiff\"\nData Store Example (workspace and store name and data store format are irrelevant):\ncurl -XPUT -H\"Content-Type:application/zip\" -u\"admin:geoserver\" -d\"/file/to/move\" \"http://localhost:8080/geoserver/rest/workspaces/a/datastores/b/external.c\"\n\n### Impact\nRenaming GeoServer files will most likely result in a denial of service, either completely preventing GeoServer from running or effectively deleting specific resources (such as a workspace, layer or style). In some cases, renaming GeoServer files could revert to the default settings for that file which could be relatively harmless like removing contact information or have more serious consequences like allowing users to make OGC requests that the customized settings would have prevented them from making. The impact of renaming non-GeoServer files depends on the specific environment although some sort of denial of service is a likely outcome.\n\n### References\nhttps://osgeo-org.atlassian.net/browse/GEOS-11213\nhttps://github.com/geoserver/geoserver/pull/7289\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.geoserver:gs-restconfig"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.23.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.geoserver:gs-restconfig"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.24.0"
}, {
"fixed" : "2.24.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/geoserver/geoserver/security/advisories/GHSA-75m5-hh4r-q9gx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23634"
}, {
"type" : "WEB",
"url" : "https://github.com/geoserver/geoserver/pull/7289"
}, {
"type" : "WEB",
"url" : "https://github.com/geoserver/geoserver/commit/5d6af2f8ba9ad7dffae59575504a867159698772"
}, {
"type" : "WEB",
"url" : "https://github.com/geoserver/geoserver/commit/c37f58fbacdfa0d581a6f99195585f70b1201f0a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/geoserver/geoserver"
}, {
"type" : "WEB",
"url" : "https://osgeo-org.atlassian.net/browse/GEOS-11213"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-73" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-20T15:01:48Z",
"nvd_published_at" : "2024-03-20T16:15:07Z"
}
}