🇰🇷 한글 설명
RatPanel 버전 2.3.19~2.5.5의 CleanPath 미들웨어 불완전한 URL 경로 처리로 인해 로그인 없이 원격 코드 실행 및 시스템 제어가 가능합니다. 백엔드 로그인 경로 획득 후 경로 조작을 통해 인증을 우회하고 임의의 시스템 명령을 실행할 수 있습니다.
💡 쉬운 설명
RatPanel 서버 관리 도구의 URL 처리 방식이 잘못되어 로그인 없이도 서버에 명령을 실행할 수 있습니다. 공격자가 백엔드 경로를 알면 쉽게 서버를 장악할 수 있습니다.
🇺🇸 원문 (English)
RatPanel is a server operation and maintenance management panel. In versions 2.3.19 through 2.5.5, when an attacker obtains the backend login path of RatPanel (including but not limited to weak default paths, brute-force cracking, etc.), they can execute system commands or take over hosts managed by the panel without logging in. In addition to this remote code execution (RCE) vulnerability, the flawed code also leads to unauthorized access. RatPanel uses the CleanPath middleware provided by github.com/go-chi/chi package to clean URLs, but but the middleware does not process r.URL.Path, which can cause the paths to be misinterpreted. This is fixed in version 2.5.6.
📍 영향받는 시스템
RatPanel 버전 2.3.19 ~ 2.5.5
⚔️ 공격 벡터
백엔드 경로 획득 후 조작된 URL로 접근하여 CleanPath 미들웨어 우회 및 시스템 명령 실행
🛡️ 대응 방법
RatPanel을 버전 2.5.6 이상으로 업그레이드
🔧 검증 코드
버전이 2.3.19~2.5.5이면 취약상태, 2.5.6 이상이면 패치된 상태입니다.
dpkg -l 2>/dev/null | grep ratpanel | awk '{print $2,$3}' || find /opt -name ratpanel -type f 2>/dev/null | xargs -I {} strings {} | grep -E 'v?2\.[3-5]\.[0-5]' | head -1