🇰🇷 한글 설명
Metacat 데이터 저장소 소프트웨어의 1.x API 내 archiveEntryName 파라미터에서 인증되지 않은 경로 탐색(Path Traversal) 취약점이 발견되었습니다. 공격자는 검증되지 않은 파일 경로를 통해 Tomcat 프로세스가 접근 가능한 모든 파일을 읽을 수 있으며, 이는 자격 증명 탈취 및 연구 데이터 유출로 이어질 수 있습니다.
💡 쉬운 설명
해커가 인증 없이도 서버의 허가되지 않은 파일들을 마음대로 읽을 수 있는 보안 구멍이 발견되었습니다. 이를 통해 중요한 비밀번호나 연구 자료가 유출될 위험이 매우 높습니다.
🇺🇸 원문 (English)
Metacat is data repository software that helps researchers preserve, share, and discover data. Versions 2.x through 2.19.1 and all 1.x versions contain an unauthenticated path traversal in the `archiveEntryName` parameter of the `action=read` endpoint that is part of the original 1.x Metacat API. `ArchiveHandler.readArchiveEntry()` concatenates the user-supplied parameter into a filesystem path without validation, and the surrounding `hasReadPermission()` check is commented out. An unauthenticated remote attacker can read any file accessible to the Tomcat process by sending a single GET request. Proof-of-concept exploits have been demonstrated and verified against this vulnerability, and it should be considered easily exploitable for any Metacat deployment < 3.0.0 by any user with access to the 1.x API. Through this vulnerability, production 2.x deployments are exposed to credential theft, client certificate and private key exfiltration enabling member node impersonation within the federation, embargoed research data disclosure, and broad system reconnaissance. Given Metacat's deployment footprint across the DataONE network of repositories and federally funded research programs, the population of exposed 2.x instances is non-trivial. The vulnerability was eliminated in Metacat version 3.0.0 and after by eliminating the entire Metacat 1.x API that exposed this vulnerability. The vulnerability was remediated in April 2024 with the release of Metacat 3.0.0, which removed the legacy Metacat API including ArchiveHandler.java. The commit message and issue reference architectural cleanup, not a security fix, and no advisory or CVE was issued. The 2.x branch was not and will not be backported, as is standard practice in Metacat, which only supports the most current release. 2.19.1 remains vulnerable with identical code and is beyond its supported lifetime. As a workaround, disable or restrict 1.x API servlets. Because the vulnerable 1.x API is no longer used or necessary in most Metacat deployments, restricting access to the old API endpoints can reduce or eliminate exposure for 2.19.x deployments. After removing those features, restart Tomcat or whichever software is hosting the servlets.
📍 영향받는 시스템
Metacat 1.x 버전 전체 및 2.x 버전 (2.0 ~ 2.19.1)
⚔️ 공격 벡터
인증되지 않은 원격 공격자가 action=read 엔드포인트에 조작된 GET 요청을 전송하여 파일 경로 탐색
🛡️ 대응 방법
Metacat 3.0.0 이상 버전으로 업그레이드하거나, 2.x 버전 사용 시 1.x API 서블릿에 대한 접근을 차단 및 제한
🔧 검증 코드
명령어 실행 시 HTTP 200 OK 응답과 함께 민감한 파일 내용이 포함된 응답이 오면 취약한 상태입니다.
curl -s -I 'http://<target_ip>/metacat/api/1.x/archive?action=read&archiveEntryName=../../../../etc/passwd' | grep 'HTTP/1.'