🇰🇷 한글 설명
PHP 4.0.7~4.4.6 및 5.x(5.2.2 이전)의 import_request_variables 함수에서 prefix 없이 호출될 경우, GET, POST, COOKIE, FILES, SERVER, SESSION 등의 superglobal 변수를 덮어쓸 수 있는 취약점입니다. 공격자가 출처 IP 주소와 Referer 정보를 위조하고 기타 변수를 조작할 수 있습니다.
💡 쉬운 설명
PHP 초기 버전에서 특정 함수가 사용자 입력으로부터 중요한 시스템 변수를 보호하지 않아, 공격자가 IP 주소나 요청 출처 정보를 위조할 수 있습니다. 웹사이트의 보안 검증을 우회하는 데 악용될 수 있습니다.
🇺🇸 원문 (English)
The import_request_variables function in PHP 4.0.7 through 4.4.6, and 5.x before 5.2.2, when called without a prefix, does not prevent the (1) GET, (2) POST, (3) COOKIE, (4) FILES, (5) SERVER, (6) SESSION, and other superglobals from being overwritten, which allows remote attackers to spoof source IP address and Referer data, and have other unspecified impact. NOTE: it could be argued that this is a design limitation of PHP and that only the misuse of this feature, i.e. implementation bugs in applications, should be included in CVE. However, it has been fixed by the vendor.
📍 영향받는 시스템
PHP 4.0.7~4.4.6, PHP 5.0.0~5.2.1
⚔️ 공격 벡터
GET, POST, COOKIE 파라미터를 통해 superglobal 변수($GLOBALS, $_SERVER 등) 직접 덮어쓰기
🛡️ 대응 방법
PHP를 5.2.2 이상 또는 4.4.7 이상으로 업그레이드하거나 import_request_variables 함수 사용 금지
🔧 검증 코드
출력된 PHP 버전이 5.2.2 이상이거나 4.4.7 이상이면 취약하지 않음, 이하면 취약함
php -v | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1