
CVE-2025-67875 - ChurchCRM has stored XSS via Person Property Assignment Leading to Admin Session Hijacking
| Field | Details |
|---|
| CVE ID | CVE-2025-67875 |
| Severity | HIGH |
| Advisory | View Advisory |
| Discovered by | Lukasz Rybak |
A critical privilege escalation vulnerability exists in ChurchCRM version 6.3.0 and earlier. An authenticated user with specific mid-level permissions ("Edit Records" and "Manage Properties and Classifications") can inject a persistent Cross-Site Scripting (XSS) payload into an administrator's profile. The payload executes when the administrator views their own profile page, allowing the attacker to hijack the administrator's session, perform administrative actions, and achieve a full account takeover.
This vulnerability is a combination of two separate flaws: an Insecure Direct Object Reference (IDOR) that allows any user to view any other user's profile, and a Broken Access Control vulnerability that allows a user with general edit permissions to modify any other user's record properties.
The attack chain is as follows:
IDOR in PersonView.php: There is no authorization check at the beginning of PersonView.php. Any authenticated user can view the profile page of any other user (e.g., PersonView.php?PersonID=1 for the admin) simply by knowing their ID.
Broken Access Control in PropertyAssign.php: The "Assign a New Property" functionality, accessible from another user's PersonView.php page, directs the user to PropertyAssign.php. This script correctly checks if the user has the general isEditRecordsEnabled() permission, but it fails to perform an object-level authorization check to verify if the user is allowed to edit the specific PersonID passed in the URL. This allows a user with "Edit Records" to modify properties of any person in the system, including an administrator.
Stored XSS Vector: An attacker can leverage these two flaws to navigate to the administrator's profile page and use the "Assign a New Property" form to save a malicious XSS payload to the administrator's record. The Value field for text-based properties is not properly sanitized on input (only strip_tags is applied, which does not remove event handlers) and is not encoded on output, leading to Stored XSS.
src/PropertyAssign.php): Saves the property value after only applying strip_tags(), which allows event handler attributes like onerror.src/PersonView.php): Renders the stored property value directly into the HTML without htmlspecialchars(), causing the payload to execute.
// src/PersonView.php, line ~722
<td><?= $r2p_Value ?></td> // Vulnerable: Raw output
This Proof of Concept demonstrates how a user with specific mid-level permissions can inject a Stored XSS payload into the main administrator's profile.
Prerequisites:
Edit RecordsManage Properties and ClassificationsScenario:

PersonID=1.
http://localhost:8101/PersonView.php?PersonID=1
PersonView.php).
PropertyAssign.php).

PersonView.php?PersonID=1), the payload will execute immediately, and an alert box will appear. The attacker could use a more advanced payload to steal the administrator's session cookie.

This is a critical privilege escalation vulnerability. It allows a user with specific, elevated (but non-admin) permissions to gain full control over an administrator's account. By hijacking the admin's session, the attacker can perform any action available to an administrator, including creating new admin accounts, deleting data, and potentially chaining this with other vulnerabilities to achieve full server compromise.
Reported by: Łukasz Rybak
This CVE was responsibly disclosed following coordinated vulnerability disclosure practices. The information provided here is for educational and defensive purposes only.