🔍 CVE-2024-36401

9.8
CVSS Score
CRITICAL
2024-07-01
2026-06-17 07:36
✅ 완료

🇰🇷 한글 설명

GeoServer의 특정 버전에서 OGC 요청 파라미터 내의 속성 이름을 XPath 표현식으로 안전하지 않게 평가하여 발생하는 원격 코드 실행(RCE) 취약점입니다. GeoTools 라이브러리가 복잡한 피처 타입뿐만 아니라 모든 피처 타입에 대해 XPath 평가를 잘못 적용함으로써 인증되지 않은 공격자가 임의의 코드를 실행할 수 있습니다.

💡 쉬운 설명

해커가 특수하게 조작된 요청을 보내 GeoServer 서버에서 마음대로 명령어를 실행할 수 있는 매우 위험한 보안 결함입니다. 인증 절차 없이도 공격이 가능하여 서버 전체의 제어권을 탈취당할 수 있습니다.

🇺🇸 원문 (English)

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 미만 버전 전체

⚔️ 공격 벡터

WFS, WMS, WPS 등 OGC 요청 파라미터에 악의적인 XPath 표현식을 삽입하여 공격

🛡️ 대응 방법

GeoServer를 최신 패치 버전(2.22.6, 2.23.6, 2.24.4, 2.25.2 이상)으로 업데이트하거나 gt-complex-x.y.jar 파일을 제거

🔧 검증 코드

명령어 결과에 패치된 버전 번호가 나타나면 취약점이 해결된 상태이며, 나타나지 않으면 취약할 가능성이 높습니다.

Shell / Script
curl -s http://localhost:8080/geoserver/version | grep -E '2.22.6|2.23.6|2.24.4|2.25.2'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Spring Data Commons