🇰🇷 한글 설명
EncapsGallery 2.0.2의 파일 업로드 함수에서 파일 확장자 검증이 부재하여 발생하는 취약점입니다. 인증된 관리자가 PHP 등 실행 가능한 파일을 업로드한 후 rwx_gallery 디렉토리를 통해 직접 접근하여 임의 코드를 실행할 수 있습니다.
💡 쉬운 설명
EncapsGallery 갤러리 소프트웨어에서 관리자가 위험한 파일 형식(PHP)을 업로드할 수 있는 보안 허점입니다. 업로드된 파일을 직접 접근해서 서버에서 실행시킬 수 있습니다.
🇺🇸 원문 (English)
Unrestricted file upload vulnerability in the file_upload function in core/misc.class.php in EncapsGallery 2.0.2 allows remote authenticated administrators to upload and execute arbitrary PHP files by uploading a file with an executable extension, then accessing it via a direct request to the file in the rwx_gallery directory. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.
📍 영향받는 시스템
EncapsGallery 2.0.2
⚔️ 공격 벡터
인증된 관리자가 file_upload 함수를 통해 PHP 파일을 업로드하고 rwx_gallery 경로로 직접 접근하여 코드 실행
🛡️ 대응 방법
EncapsGallery를 최신 버전으로 업그레이드하고 업로드 디렉토리의 PHP 실행 권한 제거 및 파일 타입 검증 강화
🔧 검증 코드
명령어 실행 결과로 misc.class.php 파일이 발견되면 EncapsGallery 설치 여부 확인; 버전은 설치 디렉토리의 README 또는 config 파일에서 확인
find /var/www/html -type f -name 'misc.class.php' 2>/dev/null | xargs grep -l 'function file_upload' 2>/dev/null