🇰🇷 한글 설명
PHP 5.3 이전 버전의 phar 확장 프로그램에서 형식 문자열 취약점이 발견되었습니다. phar:// URI를 처리하는 과정에서 메모리 접근 제어가 불충분하여 원격 공격자가 시스템 메모리 정보를 유출하거나 임의 코드를 실행할 수 있습니다.
💡 쉬운 설명
PHP에서 압축 파일(.phar)을 다룰 때 특수한 문자가 포함된 경로를 잘못 처리하는 문제입니다. 공격자가 이를 악용하면 서버의 민감한 정보를 훔치거나 코드를 실행할 수 있습니다.
🇺🇸 원문 (English)
Multiple format string vulnerabilities in the phar extension in PHP 5.3 before 5.3.2 allow context-dependent attackers to obtain sensitive information (memory contents) and possibly execute arbitrary code via a crafted phar:// URI that is not properly handled by the (1) phar_stream_flush, (2) phar_wrapper_unlink, (3) phar_parse_url, or (4) phar_wrapper_open_url functions in ext/phar/stream.c; and the (5) phar_wrapper_open_dir function in ext/phar/dirstream.c, which triggers errors in the php_stream_wrapper_log_error function.
📍 영향받는 시스템
PHP 5.3.0, 5.3.1 및 PHP 5.0~5.2.x 시리즈 (phar 확장 활성화된 환경)
⚔️ 공격 벡터
공격자가 특수 형식의 phar:// URI를 포함한 요청을 전송하여 웹 애플리케이션이 처리하도록 유도
🛡️ 대응 방법
PHP를 5.3.2 이상으로 업그레이드하거나 phar 확장 비활성화 (php.ini에서 extension=phar 제거)
🔧 검증 코드
현재 PHP 버전이 5.3.2 미만이면 VULNERABLE로 표시됩니다. 5.3.2 이상이면 안전합니다.
php -v 2>/dev/null | grep -oE 'PHP [0-9]+\.[0-9]+\.[0-9]+' | awk '{if($2 < "5.3.2") print "VULNERABLE: " $2; else print "PATCHED: " $2}'