🇰🇷 한글 설명
phpMyFAQ 4.1.1 미만 버전의 MediaBrowserController::index() 메서드에서 파일 삭제 시 경로 탐색(Path Traversal) 검증이 부족한 취약점이 존재합니다. 공격자는 CSRF 공격을 통해 name 파라미터에 ../와 같은 경로 탐색 시퀀스를 삽입하여 서버의 임의 파일을 삭제할 수 있습니다.
💡 쉬운 설명
웹사이트의 파일 삭제 기능에 보안 허점이 있어, 공격자가 특수하게 조작된 링크를 보내 서버의 중요한 파일을 몰래 지울 수 있는 문제입니다. 관리자가 로그인된 상태에서 악성 링크를 클릭하면 발생할 수 있습니다.
🇺🇸 원문 (English)
phpMyFAQ is an open source FAQ web application. Prior to version 4.1.1, the MediaBrowserController::index() method handles file deletion for the media browser. When the fileRemove action is triggered, the user-supplied name parameter is concatenated with the base upload directory path without any path traversal validation. The FILTER_SANITIZE_SPECIAL_CHARS filter only encodes HTML special characters (&, ', ", <, >) and characters with ASCII value < 32, and does not prevent directory traversal sequences like ../. Additionally, the endpoint does not validate CSRF tokens, making it exploitable via CSRF attacks. This issue has been patched in version 4.1.1.
📍 영향받는 시스템
phpMyFAQ version < 4.1.1
⚔️ 공격 벡터
CSRF를 이용한 경로 탐색(Path Traversal) 공격을 통한 임의 파일 삭제
🛡️ 대응 방법
phpMyFAQ를 최신 버전인 4.1.1 이상으로 업데이트하십시오.
🔧 검증 코드
명령어 실행 결과 버전 정보가 출력되고 4.1.1 미만인 경우 취약한 상태입니다.
grep "const VERSION" version.php | grep -E '4\.[0-1]\.[0-9]+' && ! grep -q '4.1.1' version.php