Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-66396: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in ChurchCRM CRM

0
High
VulnerabilityCVE-2025-66396cvecve-2025-66396cwe-89
Published: Wed Dec 17 2025 (12/17/2025, 19:10:49 UTC)
Source: CVE Database V5
Vendor/Project: ChurchCRM
Product: CRM

Description

ChurchCRM is an open-source church management system. Prior to version 6.5.3, a SQL injection vulnerability exists in the `src/UserEditor.php` file. When an administrator saves a user's configuration settings, the keys of the `type` POST parameter array are not properly sanitized or type-casted before being used in multiple SQL queries. This allows a malicious or compromised administrator account to execute arbitrary SQL commands, including time-based blind SQL injection attacks, to directly interact with the database. The vulnerability is located in `src/UserEditor.php` within the logic that handles saving user-specific configuration settings. The `type` parameter from the POST request is processed as an array. The code iterates through this array and uses `key($type)` to extract the array key, which is expected to be a numeric ID. This key is then assigned to the `$id` variable. The `$id` variable is subsequently concatenated directly into a `SELECT` and an `UPDATE` SQL query without any sanitization or validation, making it an injection vector. Although the vulnerability requires administrator privileges to exploit, it allows a malicious or compromised admin account to execute arbitrary SQL queries. This can be used to bypass any application-level logging or restrictions, directly manipulate the database, exfiltrate, modify, or delete all data (including other user credentials, financial records, and personal information), and could potentially lead to further system compromise, such as writing files to the server, depending on the database's configuration and user privileges. Version 6.5.3 patches the issue.

AI-Powered Analysis

AILast updated: 12/17/2025, 19:36:14 UTC

Technical Analysis

CVE-2025-66396 is a SQL injection vulnerability identified in ChurchCRM, an open-source church management system, affecting versions prior to 6.5.3. The flaw exists in the src/UserEditor.php file, specifically in the handling of the 'type' POST parameter array during the saving of user configuration settings by administrators. The vulnerability stems from the failure to properly sanitize or validate the keys of the 'type' array, which are expected to be numeric IDs but are directly used in SQL queries without any type casting or escaping. The code extracts the key using key($type) and assigns it to the $id variable, which is then concatenated into SELECT and UPDATE SQL statements. This improper neutralization of special elements (CWE-89) enables a malicious or compromised administrator to perform arbitrary SQL injection attacks, including time-based blind SQL injection. The impact includes the ability to manipulate the database directly, bypass application-level controls, exfiltrate sensitive data such as user credentials and financial records, modify or delete data, and potentially escalate the attack to write files on the server depending on database privileges. The vulnerability requires administrator-level access, which limits exploitation to insiders or attackers who have compromised admin credentials. The issue was addressed and patched in ChurchCRM version 6.5.3. The CVSS v3.1 base score is 7.2, reflecting high severity due to network attack vector, low attack complexity, high privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. No known exploits have been reported in the wild as of the publication date.

Potential Impact

For European organizations using ChurchCRM, this vulnerability poses a significant risk due to the potential for complete database compromise by malicious insiders or attackers who have gained administrator credentials. The ability to execute arbitrary SQL commands can lead to unauthorized access to sensitive personal data, including personal identifiers, financial information, and user credentials, which is critical under GDPR regulations. Data integrity and availability are also at risk, as attackers could modify or delete records, disrupting operations and trust. Additionally, depending on database permissions, attackers might escalate the attack to compromise the underlying server, leading to broader network infiltration. The insider threat aspect is particularly concerning for churches and religious organizations that may have limited cybersecurity resources. Failure to patch could result in regulatory penalties, reputational damage, and operational disruptions.

Mitigation Recommendations

European organizations should immediately upgrade ChurchCRM installations to version 6.5.3 or later to remediate this vulnerability. Until patched, restrict administrator access strictly to trusted personnel and enforce strong authentication mechanisms such as multi-factor authentication to reduce the risk of credential compromise. Conduct regular audits of administrator activities and monitor database queries for unusual patterns indicative of SQL injection attempts. Implement database-level protections such as least privilege principles, ensuring the database user ChurchCRM connects with has minimal permissions necessary, preventing file writes or system commands. Employ web application firewalls (WAFs) with rules to detect and block SQL injection payloads targeting the affected endpoints. Additionally, review and sanitize all user input rigorously in custom code and consider employing parameterized queries or prepared statements to prevent injection vulnerabilities. Finally, maintain regular backups of critical data to enable recovery in case of data tampering or loss.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-28T23:33:56.363Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 694302860b6f32e62bed0eb7

Added to database: 12/17/2025, 7:20:38 PM

Last enriched: 12/17/2025, 7:36:14 PM

Last updated: 12/18/2025, 10:59:25 AM

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats