🇰🇷 한글 설명
PHP의 Zend 엔진에서 __set, __get, __isset, __unset 메서드를 통해 접근하는 객체의 참조 사용 시 use-after-free 취약점이 발생합니다. 이를 악용하면 힙 메모리 손상으로 인한 서비스 거부(DoS) 또는 임의의 코드 실행이 가능합니다.
💡 쉬운 설명
PHP에서 이미 삭제된 메모리 영역을 다시 접근하려고 할 때 발생하는 결함입니다. 악의적인 코드가 이를 악용하면 웹 서버가 중단되거나 시스템이 장애를 일으킬 수 있습니다.
🇺🇸 원문 (English)
Use-after-free vulnerability in the Zend engine in PHP before 5.2.15 and 5.3.x before 5.3.4 might allow context-dependent attackers to cause a denial of service (heap memory corruption) or have unspecified other impact via vectors related to use of __set, __get, __isset, and __unset methods on objects accessed by a reference.
📍 영향받는 시스템
PHP 5.2.15 이전 버전 및 PHP 5.3.0~5.3.3
⚔️ 공격 벡터
특별하게 구성된 PHP 객체 참조를 이용하여 매직 메서드(__set, __get, __isset, __unset)를 호출하는 악성 스크립트
🛡️ 대응 방법
PHP를 5.2.15 이상 또는 5.3.4 이상으로 즉시 업그레이드
🔧 검증 코드
VULNERABLE이 출력되면 해당 시스템은 취약하며, PATCHED가 출력되면 패치된 버전입니다.
php -v | grep -oE 'PHP [0-9]+\.[0-9]+\.[0-9]+' | awk '{if($2<5.2.15 || ($2>=5.3 && $2<5.3.4)) print "VULNERABLE"; else print "PATCHED"}'