/

CVE-2026-39330

Severity:

HIGH RISK

(8.8)

SQL Injection in ChurchCRM /PropertyAssign.php Endpoint

CVE-2026-39330

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary Database Access and Modification

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.php within 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 Value parameter 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.

Sources

SourceLink
github.comgithub.com/ChurchCRM/CRM/security/advisories/GHSA-xq86-jh52-728g

Frequently asked

questions

It can be, provided the ChurchCRM instance is exposed over the network (e.g., internet or intranet) and an attacker can obtain a valid account with the required roles. The attack itself is carried out via standard HTTP(S) requests to the /PropertyAssign.php endpoint.

Yes. Exploitation requires an authenticated user account with both the "Manage Groups & Roles" (ManageGroups) and "Edit Records" (isEditRecordsEnabled) privileges. Users without these roles should not have direct access to the vulnerable functionality.

The safest approach is to refactor all affected queries to use parameterized statements through a trusted database abstraction layer, ensuring user input is always bound as parameters. This should be combined with server-side input validation and restricted database privileges to minimize impact.

Adopt a development standard that prohibits raw SQL concatenation with user input, enforce the use of prepared statements by default, and integrate automated static analysis and security testing into the development pipeline. Regular security-focused code reviews and developer training on injection risks further help prevent regressions.

Find out what's already
exploitable in your codebase.