🔍 CVE-2026-40076

8.8
CVSS Score
HIGH
2026-05-06
2026-10-26 19:10
✅ 완료

🇰🇷 한글 설명

OpenMRS Core의 모듈 업로드 REST 엔드포인트(POST /openmrs/ws/rest/v1/module)에 Zip Slip 경로 순회 취약점이 존재합니다. 조작된 .omod 아카이브의 web/module/ 항목에 포함된 '../' 경로가 정규화 없이 대상 경로에 결합되어 모듈 디렉터리 밖에 임의 파일을 쓸 수 있습니다. 인증된 공격자는 이를 이용해 JSP 파일을 웹 루트에 배치하고 원격 코드 실행을 달성할 수 있습니다.

💡 쉬운 설명

모듈을 설치하는 기능에서 파일 경로 검사가 부실해, 악의적으로 만든 압축 파일이 허용되지 않은 폴더에 파일을 쓸 수 있습니다. 이를 통해 공격자가 서버를 원격으로 장악할 수 있습니다.

🇺🇸 원문 (English)

OpenMRS Core is an open source electronic medical record system platform. In versions 2.7.8 and earlier and versions 2.8.0 through 2.8.5, the module upload endpoint at POST `/openmrs/ws/rest/v1/module` is vulnerable to a Zip Slip path traversal attack. During automatic extraction of uploaded .omod archives in `WebModuleUtil.startModule()`, ZIP entries under web/module/ are checked only to see whether the full entry path starts with `..,` and the remaining path is then concatenated into the destination path without normalization or a boundary check. A crafted archive can therefore include entries such as `web/module/../../../../malicious.jsp` and cause files to be written outside the intended module directory. An authenticated attacker with module upload access can write arbitrary files to locations such as the web application root and achieve remote code execution by uploading a JSP file and then requesting it. The issue is compounded by the fact that the module.allow_web_admin runtime property is enforced in the legacy UI controller but not in the REST API upload path, so deployments relying on that property to block web-based module administration remain exposed through the REST endpoint. This issue has been fixed in versions after 2.7.8 in the 2.7.x line and in version 2.8.6 and later.

📍 영향받는 시스템

OpenMRS Core 2.7.8 이하 및 2.8.0 ~ 2.8.5 (2.7.x 이후 수정판 및 2.8.6 이상으로 업데이트 필요)

⚔️ 공격 벡터

모듈 업로드 권한을 가진 인증된 사용자가 경로 순회 항목을 포함한 .omod 파일을 REST API로 업로드한 뒤 JSP 웹쉘을 요청하여 RCE를 수행

🛡️ 대응 방법

OpenMRS Core를 2.7.x 최신 패치 또는 2.8.6 이상으로 업그레이드하고, 모듈 업로드 권한을 최소화하며 REST 모듈 엔드포인트 접근을 제한

🔧 검증 코드

출력된 Implementation-Version이 2.7.8 이하 또는 2.8.0~2.8.5 범위이면 취약하며, 2.7.x 최신 패치 또는 2.8.6 이상이면 수정된 버전입니다. 아무 결과도 없으면 해당 jar를 찾지 못한 것이므로 설치 경로를 직접 확인하세요.

Shell / Script
find / -name 'openmrs*.jar' 2>/dev/null | xargs -I{} sh -c 'unzip -p {} META-INF/MANIFEST.MF 2>/dev/null | grep -i implementation-version'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Magento Open Source