🇰🇷 한글 설명
Control Web Panel(CWP) 1.29 이전 버전에는 루프백 API의 데이터베이스 복원 라우트 /v1/restoredatabase/에서 OS 명령 주입 취약점이 존재합니다. restoreDBBackup() 핸들러가 POST 본문의 공격자 제어 파일 경로를 적절한 이스케이프 없이 셸 명령에 전달하며, 공격자는 이를 통해 root 권한으로 임의의 명령을 실행할 수 있습니다.
💡 쉬운 설명
웹 호스팅 관리 프로그램인 CWP의 데이터베이스 복원 기능에 입력값 검증 실수가 있습니다. 이를 악용하면 공격자가 서버에서 관리자(root) 권한으로 원하는 명령을 실행할 수 있습니다.
🇺🇸 원문 (English)
Control Web Panel (CWP) before webpanel_version 1.29 contains an OS command injection vulnerability in the loopback API database restore route /v1/restoredatabase/, where the restoreDBBackup() handler passes an attacker-controlled file path from the POST body into a shell command without proper escaping. An attacker able to reach the route can inject arbitrary OS commands that execute as root.
📍 영향받는 시스템
Control Web Panel (CWP) webpanel_version 1.29 미만
⚔️ 공격 벡터
루프백 API 라우트 /v1/restoredatabase/에 접근 가능한 공격자가 POST 요청의 파일 경로 파라미터에 셸 명령을 삽입하여 root 권한으로 실행
🛡️ 대응 방법
CWP를 webpanel_version 1.29 이상으로 업데이트하고, 루프백 API 접근을 신뢰된 로컬 프로세스로 제한
🔧 검증 코드
출력된 버전 번호가 1.29 미만이면 취약하며, 1.29 이상이면 패치가 적용된 것이고, 아무 출력이 없으면 CWP가 설치되어 있지 않을 가능성이 높습니다.
cat /usr/local/css/version.txt 2>/dev/null || cat /usr/local/cwpsrv/htdocs/resources/admin/include/version.php 2>/dev/null | grep -i version