🇰🇷 한글 설명
PHP 4.4.x 및 5.x 버전의 memnstr 함수에서 발생하는 버퍼 오버플로우 취약점으로, explode 함수의 delimiter 인자를 통해 악용될 수 있습니다. 공격자가 제어한 구분자(delimiter)를 입력하면 서비스 거부(DoS) 또는 임의 코드 실행이 가능하며, 특히 safe_mode 환경에서 로컬 공격이 가능합니다.
💡 쉬운 설명
PHP에서 텍스트를 나누는 explode 함수가 특정 입력값에서 메모리 손상을 일으킬 수 있습니다. 이를 악용하면 서버가 충돌하거나 공격자가 서버에서 임의의 명령을 실행할 수 있습니다.
🇺🇸 원문 (English)
Buffer overflow in the memnstr function in PHP 4.4.x before 4.4.9 and PHP 5.6 through 5.2.6 allows context-dependent attackers to cause a denial of service (crash) and possibly execute arbitrary code via the delimiter argument to the explode function. NOTE: the scope of this issue is limited since most applications would not use an attacker-controlled delimiter, but local attacks against safe_mode are feasible.
📍 영향받는 시스템
PHP 4.4.0 ~ 4.4.8, PHP 5.0.0 ~ 5.2.6
⚔️ 공격 벡터
공격자가 제어한 문자열을 explode 함수의 delimiter 인자로 전달하여 버퍼 오버플로우 트리거 (주로 로컬 safe_mode 우회 공격)
🛡️ 대응 방법
PHP를 4.4.9 이상 또는 5.2.7 이상으로 업그레이드
🔧 검증 코드
PHP 버전이 영향받는 범위에 속하면 명령어가 버전 정보를 출력합니다. 출력이 없으면 패치된 버전을 사용 중입니다.
php -v 2>/dev/null | grep -E 'PHP (4\.(4\.[0-8]|[0-3])|5\.[0-2]\.[0-6])'