CVE-2024-39304

8.8 HIGH

📋 TL;DR

ChurchCRM versions before 5.9.2 contain an authenticated SQL injection vulnerability in the GetText.php endpoint. Attackers with any valid user account can inject malicious SQL through the EID parameter, potentially compromising the database. This affects all ChurchCRM deployments running vulnerable versions.

💻 Affected Systems

Products:
  • ChurchCRM
Versions: All versions prior to 5.9.2
Operating Systems: All platforms running ChurchCRM
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authentication but any valid user account can exploit this vulnerability.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, privilege escalation, and potential server takeover via SQL injection to RCE chaining.

🟠

Likely Case

Unauthorized data access, extraction of sensitive church member information, financial data exposure, and potential data corruption.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database permission restrictions.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

SQL injection via GET parameter requires minimal technical skill once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.9.2

Vendor Advisory: https://github.com/ChurchCRM/CRM/security/advisories/GHSA-2rh6-gr3h-83j9

Restart Required: No

Instructions:

1. Backup your ChurchCRM database and files. 2. Download ChurchCRM version 5.9.2 or later from the official repository. 3. Replace the existing installation with the patched version. 4. Verify the GetText.php file contains proper input validation.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize the EID parameter before processing

Modify GetText.php to validate EID parameter as integer: if(!is_numeric($_GET['EID'])) { die('Invalid input'); }

Web Application Firewall Rule

all

Block SQL injection patterns in requests to GetText.php

WAF rule: Block requests to /GetText.php containing SQL keywords in EID parameter

🧯 If You Can't Patch

  • Implement strict database user permissions with read-only access where possible
  • Monitor and alert on suspicious database queries from ChurchCRM application

🔍 How to Verify

Check if Vulnerable:

Check if ChurchCRM version is below 5.9.2 in system settings or by examining the application files.

Check Version:

Check ChurchCRM admin dashboard or examine version.php file in installation directory

Verify Fix Applied:

Verify ChurchCRM version is 5.9.2 or higher and test the GetText.php endpoint with SQL injection payloads.

📡 Detection & Monitoring

Log Indicators:

  • Unusual database queries from ChurchCRM application
  • Multiple failed login attempts followed by GetText.php access
  • SQL error messages in application logs

Network Indicators:

  • HTTP GET requests to /GetText.php with SQL keywords in parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri_path="/GetText.php" AND (query_string="*SELECT*" OR query_string="*UNION*" OR query_string="*OR*1=1*")

🔗 References

📤 Share & Export