🇰🇷 한글 설명
Yii 2 PHP 프레임워크의 View::renderPhpFile() 메서드에서 extract($_params_, EXTR_OVERWRITE)가 파일 로드 전에 실행되어, 공격자가 $_params 배열의 _file_ 키를 조작하여 포함되는 파일을 변경할 수 있습니다. 이는 다른 취약점으로 PHP 파일을 작성할 수 있다면 원격 코드 실행(RCE) 또는 정보 유출로 이어질 수 있습니다.
💡 쉬운 설명
Yii 2 프레임워크의 뷰 렌더링 함수가 사용자가 제어할 수 있는 파라미터를 잘못 처리하여 로드되는 파일을 바꿀 수 있습니다. 다른 취약점으로 파일을 쓸 수 있다면 악성 코드를 실행하거나 민감 정보를 읽을 수 있습니다.
🇺🇸 원문 (English)
Yii 2 is a PHP application framework. Versions 2.0.54 and prior contain flawed logic in the core view rendering method View::renderPhpFile() that leads to Local File Inclusion. The function calls extract($_params_, EXTR_OVERWRITE) before the require statement that loads the view file. As a result, a caller-controlled _file_ key in the $params array overwrites the internal local variable specifying which file to include, potentially enabling RCE if an attacker can write PHP files through a separate primitive, as well as information disclosure. This issue has been fixed in version 2.0.55.
📍 영향받는 시스템
Yii 2 framework versions 2.0.54 and prior
⚔️ 공격 벡터
Supply malicious _file_ parameter in $_params array to View::renderPhpFile() to change the included file path and load attacker-controlled PHP file
🛡️ 대응 방법
Update Yii 2 to version 2.0.55 or later; verify no custom code relies on the extract() behavior
🔧 검증 코드
Shows installed Yii 2 version; if 2.0.54 or earlier, system is vulnerable. Version 2.0.55+ contains the fix.
php -r '@include "vendor/autoload.php"; echo Yii::getVersion();' 2>/dev/null || grep -A2 '"yiisoft/yii2"' composer.lock 2>/dev/null | grep version | head -1