Summary
An SQL injection vulnerability in ChurchCRM's /PropertyAssign.php endpoint allows authenticated users with specific roles to inject arbitrary SQL via the Value parameter.
Under these conditions, an attacker can extract or modify data in the underlying database, potentially impacting sensitive church member and organizational records.
Affected context
This vulnerability occurs in ChurchCRM deployments using versions prior to 7.1.0 where the /PropertyAssign.php endpoint is exposed to authenticated application users.
It manifests when the Value parameter accepted by this endpoint is passed into SQL queries without sufficient validation, parameterization, or escaping.
Only users who are logged in and granted both "Manage Groups & Roles" (ManageGroups) and "Edit Records" (isEditRecordsEnabled) permissions can directly reach and abuse this functionality.
Exploit preconditions
- Attack surface: HTTP(S) endpoint
/PropertyAssign.phpwithin the ChurchCRM web interface. - Required access: Valid, authenticated ChurchCRM account with both:
- Manage Groups & Roles (ManageGroups)
- Edit Records (isEditRecordsEnabled)
- Trigger point: Supplying crafted input in the
Valueparameter within requests handled by/PropertyAssign.php. - Why exploitation is possible: The Value parameter is incorporated into SQL statements in an unsafe way, likely through string concatenation or interpolation, without using parameterized queries or robust input handling. This allows attacker-controlled input to alter the intended structure of database queries.
Why this happens
The underlying issue is improper handling of user-controlled input in dynamically constructed SQL queries, mapping directly to CWE-89: SQL Injection.
Instead of treating the Value parameter strictly as data, the application assembles SQL statements by combining raw input with query syntax.
This pattern breaks the separation between code and data at the database layer, allowing crafted input to inject additional conditions, union queries, or data-modifying commands.
Potential impact
- Retrieval of sensitive information stored in ChurchCRM tables, including member and organizational data.
- Modification of existing records, such as altering group memberships, roles, or other property assignments.
- Insertion of arbitrary data that could corrupt reports, workflows, or audit trails.
- Deletion of data that may impact operational continuity or integrity of church records.
- Escalation of impact when combined with other weaknesses, such as weak access controls or excessive database privileges for the application account.
General mitigation guidance
Effective mitigation generally focuses on enforcing strict separation between query logic and data:
- Use parameterized queries (prepared statements) for all database interactions, ensuring user input is always bound as parameters rather than interpolated into SQL strings.
- Centralize database access through a data access layer that enforces safe query construction patterns, avoiding ad-hoc SQL concatenation in controllers or view logic.
- Apply robust server-side validation and normalization for property-related inputs, constraining values to expected formats, types, and ranges.
- Limit database privileges granted to the application account to only the minimal operations needed, reducing the blast radius of potential injection.
- Adopt secure coding guidelines and peer review practices emphasizing the avoidance of inline dynamic SQL wherever user input is involved.
How teams detect issues like this
Organizations can detect and monitor for SQL injection risks in ChurchCRM and similar applications through:
- Static analysis: Configure SAST tools or linters to flag dynamic SQL construction patterns, such as string concatenation involving request parameters or superglobals, and calls to database APIs without parameter binding.
- Code review: During manual review, pay close attention to endpoints handling user-editable properties, checking that all queries use prepared statements and that no untrusted input reaches SQL syntax directly.
- Runtime monitoring: Use web application firewalls (WAFs) or database activity monitoring solutions to detect suspicious patterns (e.g., stacked queries, unexpected UNIONs, or tautological conditions) originating from the application.
- Security testing: Incorporate automated and manual SQL injection tests into CI/CD pipelines and periodic security assessments, targeting endpoints that update or assign properties and roles.

