Summary
A time-based blind SQL injection in ChurchCRM's PropertyAssign.php endpoint allows authenticated users with Edit Records or Manage Groups permissions to manipulate backend database queries.
Under these conditions, an attacker can exfiltrate or modify sensitive database content, including credentials, PII, and configuration secrets, without direct visibility into query results.
Affected context
This vulnerability arises in ChurchCRM deployments where authenticated users can access the PropertyAssign.php functionality and user-provided parameters are incorporated into SQL statements without robust server-side validation or parameterization.
It specifically impacts environments that:
- Allow users with Edit Records or Manage Groups permissions to interact with property assignment features
- Rely on dynamic SQL generation without prepared statements
- Expose a database user with broad read/write privileges over application tables
Exploit preconditions
- Attack surface: HTTP(S) requests to the
PropertyAssign.phpendpoint within an authenticated ChurchCRM session. - Required access: Valid application account with permissions such as Edit Records or Manage Groups.
- Trigger point: User-controlled input fields or parameters processed by
PropertyAssign.phpand interpolated into SQL queries. - Why exploitation is possible: The endpoint builds SQL statements using untrusted data without proper parameter binding, enabling malicious input to alter query logic and infer results through timing differences (time-based blind SQL injection).
Why this happens
The root cause is the construction of SQL queries by concatenating or interpolating user-supplied data directly into query strings, instead of using parameterized queries or stored procedures.
This insecure pattern matches CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where input fields intended for data are allowed to influence control structures of the query.
In the time-based blind variant, the application does not return explicit database errors or data, but query execution time can be manipulated by attackers to leak information bit by bit.
Potential impact
- Extraction of sensitive data, including user credentials and personal identifiable information (PII)
- Exposure of configuration secrets such as API keys, mail credentials, or integration tokens
- Modification or deletion of application data, including group records and membership information
- Creation, escalation, or disabling of user accounts via direct database manipulation
- Potential compromise of the broader infrastructure if configuration data includes downstream system credentials
General mitigation guidance
Effective mitigation focuses on eliminating direct injection of user input into SQL and tightening database trust boundaries:
- Use parameterized queries or prepared statements for all database interactions in
PropertyAssign.phpand similar endpoints. - Apply strict server-side validation and canonicalization to inputs, ensuring only expected types, ranges, and identifiers are accepted.
- Enforce least-privilege for the database account used by the application, limiting access to necessary tables and operations.
- Centralize data access through a vetted data access layer to avoid ad-hoc query construction in presentation or controller code.
- Implement defense-in-depth controls such as web application firewalls (WAF) tuned to detect and block SQL injection patterns.
How teams detect issues like this
Detection can combine code-centric and runtime monitoring approaches:
- Static analysis rules that flag dynamic SQL construction, string concatenation involving request parameters, and unparameterized queries in PHP code.
- Targeted code review of endpoints handling property assignments or group management to verify use of prepared statements and input validation.
- Database monitoring for anomalous or unusually complex queries originating from application accounts, especially those with conditional timing constructs.
- Web and application logs analysis for suspicious patterns in parameters sent to
PropertyAssign.php, including typical SQL injection metacharacters and timing probes. - Integration of automated security testing tools (SAST/DAST) into CI/CD pipelines to continuously detect SQL injection patterns in code and HTTP endpoints.

