🇰🇷 한글 설명
PrivateBin 1.7.7~2.0.2 버전에서 템플릿 선택 기능이 활성화되면, 인증 없이 template 쿠키를 통해 임의의 PHP 파일을 포함할 수 있는 Local File Inclusion 취약점입니다. 이를 통해 민감한 정보 유출 또는 원격 코드 실행이 가능합니다.
💡 쉬운 설명
PrivateBin 웹사이트에서 설정이 잘못되면, 공격자가 특수한 쿠키를 보내 서버의 파일을 읽거나 악의적인 코드를 실행할 수 있습니다. 이는 서버에 저장된 중요한 정보를 탈취하거나 서버를 장악할 수 있다는 뜻입니다.
🇺🇸 원문 (English)
PrivateBin is an online pastebin where the server has zero knowledge of pasted data. Starting in version 1.7.7 and prior to version 2.0.3, an unauthenticated Local File Inclusion exists in the template-switching feature. If `templateselection` is enabled in the configuration, the server trusts the `template` cookie and includes the referenced PHP file. An attacker can read sensitive data or, if they manage to drop a PHP file elsewhere, gain remote code execution. The constructed path of the template file is checked for existence, then included. For PrivateBin project files this does not leak any secrets due to data files being created with PHP code that prevents execution, but if a configuration file without that line got created or the visitor figures out the relative path to a PHP script that directly performs an action without appropriate privilege checking, those might execute or leak information. The issue has been patched in version 2.0.3. As a workaround, set `templateselection = false` (which is the default) in `cfg/conf.php` or remove it entirely
📍 영향받는 시스템
PrivateBin 1.7.7 ~ 2.0.2 (templateselection 활성화 상태)
⚔️ 공격 벡터
HTTP 쿠키를 통해 template 파라미터 조작으로 임의 PHP 파일 포함 및 실행
🛡️ 대응 방법
PrivateBin을 2.0.3 이상으로 업그레이드하거나 cfg/conf.php에서 templateselection = false로 설정
🔧 검증 코드
설정에서 templateselection이 false로 설정되었거나 주석 처리되었는지 확인. true로 설정되면 취약한 상태입니다.
grep -E 'templateselection\s*=' /path/to/cfg/conf.php