🇰🇷 한글 설명
ChurchCRM은 오픈소스 교회 관리 시스템입니다. 버전 5.21.0 이전 버전에서는 설정 마법사에서 사전 인증 원격 코드 실행 취약점이 존재하여 인증되지 않은 공격자가 초기 설치 과정에서 임의의 PHP 코드를 주입할 수 있으며, 이는 서버를 완전히 손상시킬 수 있습니다. 취약점은 사용자 입력이 유효성 검사나 제한 없이 직접 PHP 설정 템플릿에 연결되어 있습니다.
💡 쉬운 설명
ChurchCRM의 초기 설치 과정에서 공격자가 임의의 PHP 코드를 주입할 수 있는 취약점이 있습니다. 이는 서버를 손상시킬 수 있으며, 아무런 인증 없이 발생하므로 매우 심각한 취약점입니다. 버전 5.21.0으로 업데이트하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.
📍 영향받는 시스템
ChurchCRM 버전 5.21.0 이전
⚔️ 공격 벡터
초기 설치 과정에서 설정 마법사에 악의적인 입력을 주입
🛡️ 대응 방법
ChurchCRM을 버전 5.21.0 이상으로 업데이트하세요
🔧 검증 코드
로컬에서 ChurchCRM을 설치하고, Python requests 라이브러리가 설치된 상태에서 위의 코드를 실행하세요. ChurchCRM의 Config.php 파일에 접근이 가능하다면 취약한 것으로 판단합니다. 이 코드는 ChurchCRM이 설치된 서버의 도메인 주소를 'https://example.com'으로 변경하여 실행해야 합니다.
import requests
response = requests.get('https://example.com/ChurchCRM/Include/Config.php')
if response.status_code == 200:
print({"result": "취약", "reason": "Config.php 파일에 접근 가능"})
else:
print({"result": "양호", "reason": "Config.php 파일에 접근 불가"})