🇰🇷 한글 설명
Simple PHP Blog의 upload_img_cgi.php에서 파일 확장자 검증이 불완전하여, .php.나 .htaccess 등으로 파일명을 속이면 필터를 우회할 수 있습니다. 이를 통해 원격 공격자가 임의의 PHP 코드를 업로드하고 서버에서 실행할 수 있습니다.
💡 쉬운 설명
블로그 프로그램의 파일 업로드 기능이 제대로 검증하지 않아, 파일명 끝에 점이나 다른 확장자를 붙여서 php 파일을 업로드하면 서버가 그것을 실행합니다. 해커는 이를 이용해 서버 전체를 제어할 수 있습니다.
🇺🇸 원문 (English)
Incomplete blacklist vulnerability in upload_img_cgi.php in Simple PHP Blog before 0.5.1 allows remote attackers to upload dangerous files and execute arbitrary code, as demonstrated by a filename ending in .php. or a .htaccess file, a different vector than CVE-2005-2733. NOTE: the vulnerability was also present in a 0.5.1 download available in the early morning of 20070923. NOTE: the original 20070920 disclosure provided an incorrect filename, img_upload_cgi.php.
📍 영향받는 시스템
Simple PHP Blog 0.5.1 이전 모든 버전
⚔️ 공격 벡터
웹 UI의 파일 업로드 폼을 통해 .php., .php5., .phtml, .htaccess 등의 파일명으로 PHP 셸 코드 업로드
🛡️ 대응 방법
Simple PHP Blog를 0.5.1 이상으로 업그레이드하거나 upload_img_cgi.php의 파일 검증을 화이트리스트 기반으로 재구현
🔧 검증 코드
파일이 발견되면 해당 디렉토리의 Simple PHP Blog 버전을 확인하여 0.5.1 이상인지 검증 필요
find / -name 'upload_img_cgi.php' 2>/dev/null