🇰🇷 한글 설명
PHP 템플릿 엔진인 Smarty 5.0.0부터 5.8.4 버전 사이에서 stream: 리소스 이름 처리가 미흡하여 발생하는 취약점입니다. 공격자가 php://filter와 같은 PHP 스트림 래퍼를 사용하여 PHP 프로세스가 접근 가능한 임의의 로컬 파일을 읽을 수 있습니다.
💡 쉬운 설명
웹사이트의 화면을 만드는 도구인 Smarty의 허점을 이용해 서버에 저장된 중요한 파일을 몰래 훔쳐볼 수 있는 문제입니다. 공격자가 특수한 명령어를 입력하면 서버 내부의 비밀번호나 설정 파일을 읽어갈 수 있습니다.
🇺🇸 원문 (English)
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. From 5.0.0 until 5.8.4, Smarty's stream: resource-name handling does not adequately restrict which PHP stream wrappers and filter chains can be referenced from a template, allowing a php://filter-wrapped resource name to be used to read the contents of arbitrary local files accessible to the PHP process. An attacker able to author or influence a template's resource reference could exploit this to disclose sensitive file contents outside the intended template/config scope. This issue is fixed in version 5.8.4.
📍 영향받는 시스템
Smarty version 5.0.0 ~ 5.8.4
⚔️ 공격 벡터
템플릿 내 리소스 참조 시 php://filter와 같은 스트림 래퍼를 사용하여 임의의 로컬 파일에 접근
🛡️ 대응 방법
Smarty를 최신 보안 패치가 적용된 버전인 5.8.4 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 5.8.4 미만인 경우 해당 취약점에 노출된 상태입니다.
composer show smarty/smarty | grep 'versions'