ghsa-75m5-hh4r-q9gx
Vulnerability from github
Summary
An 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".
Details
Store 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.
PoC
Coverage Store Example (workspace and store name are irrelevant and any valid coverage format can be used): curl -XPUT -H"Content-Type:application/zip" -u"admin:geoserver" -d"/file/to/move" "http://localhost:8080/geoserver/rest/workspaces/a/coveragestores/b/external.geotiff" Data Store Example (workspace and store name and data store format are irrelevant): curl -XPUT -H"Content-Type:application/zip" -u"admin:geoserver" -d"/file/to/move" "http://localhost:8080/geoserver/rest/workspaces/a/datastores/b/external.c"
Impact
Renaming 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.
References
https://osgeo-org.atlassian.net/browse/GEOS-11213 https://github.com/geoserver/geoserver/pull/7289
{ "affected": [ { "package": { "ecosystem": "Maven", "name": "org.geoserver:gs-restconfig" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.23.5" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.geoserver:gs-restconfig" }, "ranges": [ { "events": [ { "introduced": "2.24.0" }, { "fixed": "2.24.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2024-23634" ], "database_specific": { "cwe_ids": [ "CWE-20", "CWE-73" ], "github_reviewed": true, "github_reviewed_at": "2024-03-20T15:01:48Z", "nvd_published_at": "2024-03-20T16:15:07Z", "severity": "MODERATE" }, "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\u0027t 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", "id": "GHSA-75m5-hh4r-q9gx", "modified": "2024-03-20T21:04:06Z", "published": "2024-03-20T15:01:48Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:H", "type": "CVSS_V3" } ], "summary": "GeoServer Arbitrary file renaming vulnerability in REST Coverage/Data Store API" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.