CVE-2024-36401 Remote Code Execution (RCE) vulnerability in evaluating property name expressions in Geoserver
Geoserver에서 속성 이름 식을 평가할 때의 RCE(원격 코드 실행) 취약점
설명
GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.22.6, 2.23.6, 2.24.4, and 2.25.2, multiple OGC request parameters allow Remote Code Execution (RCE) by unauthenticated users through specially crafted input against a default GeoServer installation due to unsafely evaluating property names as XPath expressions. The GeoTools library API that GeoServer calls evaluates property/attribute names for feature types in a way that unsafely passes them to the commons-jxpath library which can execute arbitrary code when evaluating XPath expressions. This XPath evaluation is intended to be used only by complex feature types (i.e., Application Schema data stores) but is incorrectly being applied to simple feature types as well which makes this vulnerability apply to **ALL** GeoServer instances. No public PoC is provided but this vulnerability has been confirmed to be exploitable through WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic and WPS Execute requests. This vulnerability can lead to executing arbitrary code. Versions 2.22.6, 2.23.6, 2.24.4, and 2.25.2 contain a patch for the issue. A workaround exists by removing the `gt-complex-x.y.jar` file from the GeoServer where `x.y` is the GeoTools version (e.g., `gt-complex-31.1.jar` if running GeoServer 2.25.1). This will remove the vulnerable code from GeoServer but may break some GeoServer functionality or prevent GeoServer from deploying if the gt-complex module is needed.
GeoServer는 사용자가 지리 공간 데이터를 공유하고 편집 할 수있는 오픈 소스 서버입니다. 2.22.6, 2.23.6, 2.24.4 및 2.25.2 버전 이전에 여러 OGC 요청 매개 변수는 XPath 표현식으로 속성 이름을 안전하지 않게 평가하여 기본 GeoServer 설치에 대해 특별히 만들어진 입력을 통해 인증되지 않은 사용자가 원격 코드 실행(RCE)을 허용합니다. GeoServer가 호출하는 GeoTools 라이브러리 API는 XPath 표현식을 평가할 때 임의의 코드를 실행할 수 있는 commons-jxpath 라이브러리로 안전하게 전달되는 방식으로 기능 유형에 대한 속성/속성 이름을 평가합니다. 이 XPath 평가는 복잡한 기능 유형(즉, 애플리케이션 스키마 데이터 저장소)에서만 사용되도록 의도되었지만, 이 취약점을 ** ALL** GeoServer 인스턴스에도 적용하게 하는 간단한 기능 유형에도 잘못 적용되고 있습니다. 공개 PoC는 제공되지 않지만 이 취약점은 WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic 및 WPS 실행 요청을 통해 악용 가능한 것으로 확인되었습니다. 이 취약점은 임의의 코드를 실행하게 할 수 있습니다. 2.22.6, 2.23.6, 2.24.4 및 2.25.2 버전에는 이 문제에 대한 패치가 포함되어 있습니다. 해결 방법은 GeoServer에서 `x.y`가 GeoTools 버전 인 `gt-complex-x.y.jar`파일을 제거하는 것입니다 (예 : `gt-complex-31.1.jar`GeoServer 2.25.1을 실행하는 경우). 이렇게 하면 GeoServer에서 취약한 코드가 제거되지만 일부 GeoServer 기능이 손상되거나 gt-complex 모듈이 필요한 경우 GeoServer가 배포되지 않을 수 있습니다.
영향 받는 제품 제품 1개
-
해결 버전 있음
geoserver
geoserver
영향 받는 버전
- 2.23.0 이상 2.23.6 미만
- 2.24.0 이상 2.24.4 미만
- 2.25.0 이상 2.25.2 미만
- 2.22.6 미만
해결 버전
- 2.23.6 이상
- 2.24.4 이상
- 2.25.2 이상
- 2.22.6 이상
참고 자료 5건
- github.com https://github.com/geoserver/geoserver/security/advisories/GHSA-6jj6-gm7p-fcvv (새 창)
- github.com https://github.com/geotools/geotools/pull/4797 (새 창)
- github.com https://github.com/geotools/geotools/security/advisories/GHSA-w3pj-wh35-fq8w (새 창)
- github.com https://github.com/Warxim/CVE-2022-41852?tab=readme-ov-file#workaround-for-cve-2022-41852 (새 창)
- osgeo-org.atlassian.net https://osgeo-org.atlassian.net/browse/GEOT-7587 (새 창)