ChurchCRM Pre-Authentication Remote Code Execution Vulnerability (CVE-2026-39337)
A critical pre-authentication remote code execution vulnerability in ChurchCRM versions prior to 7.1.0 allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise.
ChurchCRM, an open-source church management system, is vulnerable to a critical pre-authentication remote code execution (RCE) flaw, identified as CVE-2026-39337. This vulnerability affects versions prior to 7.1.0. Unauthenticated attackers can exploit the setup wizard during the initial installation process to inject arbitrary PHP code, leading to complete server compromise. The root cause lies in the insufficient sanitization of the “$dbPassword” variable. This vulnerability is a result of an incomplete fix for a previous vulnerability, CVE-2025-62521. Organizations using vulnerable versions of ChurchCRM are at risk of unauthorized access, data breaches, and complete system takeover. Upgrading to version 7.1.0 or later is strongly advised to mitigate this risk.
Attack Chain
- An unauthenticated attacker sends a malicious HTTP request to the ChurchCRM setup wizard.
- The malicious request injects arbitrary PHP code into the
$dbPasswordvariable during the setup process. - Due to insufficient sanitization, the injected PHP code is written to the ChurchCRM configuration file.
- The attacker triggers the execution of the configuration file, executing the injected PHP code.
- The attacker gains arbitrary code execution on the web server.
- The attacker escalates privileges to gain full control of the server.
- The attacker installs a persistent backdoor for continued access.
- The attacker may then exfiltrate sensitive data or deploy ransomware.
Impact
Successful exploitation of CVE-2026-39337 allows an unauthenticated attacker to achieve complete server compromise. This could result in the theft of sensitive church member data, modification or destruction of data, defacement of the ChurchCRM website, or use of the server as a platform for launching further attacks. Given the critical nature of the vulnerability and the ease of exploitation, organizations are at high risk. The number of potential victims is high considering the wide usage of this CRM.
Recommendation
- Immediately upgrade ChurchCRM to version 7.1.0 or later to patch CVE-2026-39337.
- Monitor web server logs for suspicious activity related to the ChurchCRM setup wizard. Deploy a Sigma rule to detect suspicious POST requests to the install endpoint.
- Implement strong input validation and sanitization for all user-supplied data, especially during the installation process.
- Review and harden the web server configuration to prevent unauthorized code execution.
Detection coverage 2
Detect Suspicious POST Requests to ChurchCRM Install Endpoint
highDetects potential exploitation attempts targeting the ChurchCRM setup wizard by monitoring for suspicious POST requests to the installation endpoint.
Detect PHP Code Injection via User Agent
mediumDetects potential PHP code injection attempts by monitoring for suspicious User-Agent strings containing PHP tags.
Detection queries are kept inside the platform. Get full rules →