🇰🇷 한글 설명
Smarty 2.6.9 템플릿 엔진의 libs/Smarty.class.php 파일에서 filename 매개변수를 통한 원격 파일 포함(RFI) 취약점입니다. 공격자가 악의적인 URL을 filename 파라미터로 전달하여 원격 PHP 코드를 실행할 수 있습니다.
💡 쉬운 설명
Smarty라는 PHP 도구의 파일명 입력 부분이 안전하지 않아 인터넷에서 코드를 불러와 실행하게 할 수 있습니다. 웹사이트가 해킹되어 공격자가 원하는 명령어를 서버에서 실행할 수 있게 됩니다.
🇺🇸 원문 (English)
PHP remote file inclusion vulnerability in libs/Smarty.class.php in Smarty 2.6.9 allows remote attackers to execute arbitrary PHP code via a URL in the filename parameter. NOTE: in the original disclosure, filename is used in a function definition, so this report is probably incorrect
📍 영향받는 시스템
Smarty 2.6.9 및 그 이전 버전 (정확한 영향 범위는 disclosure 검증 필요)
⚔️ 공격 벡터
HTTP 요청을 통해 filename 파라미터에 원격 PHP 파일의 URL을 삽입하여 원격 코드 실행
🛡️ 대응 방법
Smarty를 2.6.10 이상으로 업그레이드하고, 사용자 입력에 대한 검증 및 파일 포함 제한 정책 적용
🔧 검증 코드
Smarty 패키지가 설치되어 있으면 파일 경로가 출력되며, 해당 경로의 Smarty.class.php 버전을 확인하여 2.6.9 이하인지 검증
grep -r 'smarty' composer.json 2>/dev/null || find . -name 'Smarty.class.php' 2>/dev/null | head -1