GHSA-jhqx-5v5g-mpf3

Suggest an improvement
Source
https://github.com/advisories/GHSA-jhqx-5v5g-mpf3
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/07/GHSA-jhqx-5v5g-mpf3/GHSA-jhqx-5v5g-mpf3.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jhqx-5v5g-mpf3
Aliases
Published
2024-07-01T19:24:04Z
Modified
2024-07-01T19:42:51.779560Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat
Details

Impact

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).

Patches

https://github.com/GeoWebCache/geowebcache/pull/1211

Workarounds

Change environment:

  • Change from Windows operating system. This vulnerability depends on Windows file paths so Linux and Mac OS are not vulnerable.
  • Change from Apache Tomcat application server. Jetty and WildFly are confirmed to not be vulnerable. Other application servers have not been tested and may be vulnerable.

Disable anonymous access to the embeded GeoWebCache administration and status pages:

  1. Navigate to Security > Authentication Page
  2. Locate Filter Chains heading
  3. Select the web filter filter chain (ant pattern /web/**,/gwc/rest/web/**,/)
  4. Remove ,/gwc/rest/web/** from the pattern (so that /web/**,/ is left).
  5. Save the changes

References

  • CVE-Pending
Database specific
{
    "nvd_published_at": "2024-07-01T14:15:05Z",
    "cwe_ids": [
        "CWE-22"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2024-07-01T19:24:04Z"
}
References

Affected packages

Maven / org.geoserver.web:gs-web-app

Package

Name
org.geoserver.web:gs-web-app
View open source insights on deps.dev
Purl
pkg:maven/org.geoserver.web/gs-web-app

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.23.5

Maven / org.geoserver.web:gs-web-app

Package

Name
org.geoserver.web:gs-web-app
View open source insights on deps.dev
Purl
pkg:maven/org.geoserver.web/gs-web-app

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.24.0
Fixed
2.24.3

Maven / org.geoserver:gs-gwc

Package

Name
org.geoserver:gs-gwc
View open source insights on deps.dev
Purl
pkg:maven/org.geoserver/gs-gwc

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.23.5

Maven / org.geoserver:gs-gwc

Package

Name
org.geoserver:gs-gwc
View open source insights on deps.dev
Purl
pkg:maven/org.geoserver/gs-gwc

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.24.0
Fixed
2.24.3