CVE-2026-94479churchcrm/crm Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
NVD
Vulnerability Summary
Summary A stored cross-site scripting vulnerability exists in the family deletion confirmation page. The family name retrieved from the database is concatenated directly into an HTML `<div>` body without output encoding. An administrator who imports a CSV file can store a crafted payload in the family name field, executing JavaScript in the browser of any Finance-enabled user who navigates to that family's delete-confirmation page. > Write path note: `FamilyEditor.php` (UI form) applies `legacyFilterInput()` → `strip_tags()` on `$_POST['Name']` (line 81), which strips all HTML tags — `strip_tags('<img src=x onerror=alert(1)>')` returns `''`. The confirmed write path is CSV Import (`Admin → Get Started → Import from a Spreadsheet`), which calls `$family->setName($data['LastName'])` directly (`import.php:687`) — no sanitization applied. Details Sink: `src/SelectDelete.php:78` ```php echo '<div class="card-header"><strong>' . gettext('Family Name') . ':' . " $fam_Name</strong></div>"; ``` `$fam_Name` is fetched via `$family->getName()` (line 54) from the database and concatenated raw into the HTML body. No `escapeHTML()` is applied. Contrast: Lines 216–217 in the same file use proper escaping: ```php echo ' ' . InputUtils::escapeHTML($fam_Name); ``` confirming the pattern exists — the omission at line 78 is the bug. Trigger condition: This branch (line 78) executes only when: 1. The family has at least one Payment record in `pledge_plg` (`plg_PledgeOrPayment = 'Payment'`, `plg_FamID = <id>`) 2. The viewing user has Finance permission (`usr_Finance = 1`) AND Delete Records permission (`usr_DeleteRecords = 1`) Data flow: - `import.php:687`: `$family->setName($data['LastName'])` — raw CSV value, no sanitization - `Family::setName()` (Base/Family.php): only casts `(string)$v` - `SelectDelete.php:54`: `$fam_Name = $family->getName()` — raw DB value - `SelectDelete.php:78`: `" $fam_Name"` concatenated into HTML string — XSS fires PoC Requires: Admin account (CSV Import feature is Admin-only). Trigger: XSS fires for any Finance+DeleteRecords enabled user who navigates to the family delete-confirmation page. Payload size constraints (varchar limits): | Field | DB column | Limit | Payload used | |---|---|---|---| | LastName (→ Family Name) | `fam_Name` | varchar(50) | `<img src=x onerror=alert(document.domain)>` (43 chars) | Step 1 — Admin Login Access `http://localhost` → log in: Username: `Admin` / Password: `changeme` Step 2 — Open the CSV Import Page On the top navigation bar: Admin → Get Started. On the Get Started page, click the "Import from a Spreadsheet" card (CSV file icon). Destination URL: `http://localhost/admin/import/csv` Step 3 — Create a malicious CSV file Create the file `xss_test.csv` (encoding UTF-8): ``` FamilyID,FirstName,LastName 9006,XSSTest,"<img src=x onerror=alert(document.domain)>" ``` The `LastName` column is mapped to `fam_Name` (family name) in the DB via `$family->setName($data['LastName'])` (`import.php:687`) — bypasses `strip_tags()` entirely. Step 4 — Upload CSV On the `/admin/import/csv` page: Click "Choose File" → select `xss_test.csv` Click "Upload" Step 5 — Map Columns and Confirm Import | CSV Column | ChurchCRM Field | |---|---| | FamilyID | Family ID | | FirstName | First Name | | LastName | Last Name | Click "Import" to confirm. Note the new Family ID assigned (check People → Families → search "XSSTest"). Step 6 — Add a Payment Record The vulnerable branch only renders when the family has at least one Payment record. Insert one directly: ```sql mysql -u churchcrm -p'StrongPass123!' churchcrm -e " INSERT INTO pledge_plg (plg_FamID, plg_date, plg_amount, plg_PledgeOrPayment, plg_method, plg_GroupKey, plg_NonDeductible) VALUES (<FAMILY_ID>, CURDATE(), 10.00, 'Payment', 'CASH', '', 0.00);" ``` Replace `<FAMILY_ID>` with the ID from Step 5. Step 7 — XSS Trigger As a Finance+DeleteRecords enabled user, navigate to: `http://localhost/SelectDelete.php?FamilyID=<FAMILY_ID>` `alert(document.domain)` pops up as soon as the page loads. Actual HTML in the response: ```html <!-- SelectDelete.php:78 — raw string concatenation: --> <div class="card-header"> <strong>Family Name: <img src=x onerror=alert(document.domain)></strong> </div> ``` `<img src=x>` load fails → `onerror` fires → `alert(document.domain)` executes. Impact - Type: CWE-79 — Stored XSS (HTML body via string concatenation). CVSS 3.1 ≈ 4.4 (AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N). - Who can plant it: Administrator with CSV import access. - Who is affected: Finance+DeleteRecords enabled users who navigate to the family delete-confirmation page. - Consequence: Arbitrary JavaScript execution; session/credential theft. Suggested Fix File: `src/SelectDelete.php` Line 78 — family name in card header: Before (vulnerable): ```php echo '<div class="card-header"><strong>' . gettext('Family Name') . ':' . " $fam_Name</strong></div>"; ``` After (fixed): ```php echo '<div class="card-header"><strong>' . gettext('Family Name') . ': ' . InputUtils::escapeHTML($fam_Name) . '</strong></div>'; ``` This change mirrors the escaping pattern already used at lines 216–217 of the same file. `InputUtils::escapeHTML()` converts `<`, `>`, `"`, `'`, and `&` to their HTML entity equivalents, neutralising any injected markup.
Affected & Patched Versions
- churchcrm/crm < 7.6.0
- churchcrm/crm 7.6.0
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run churchcrm/crm and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Aug 14, 2026Published
- Aug 14, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new churchcrm/crm CVEsYou are reading CVE-2026-94479. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Nov 24, 2026 08:00 UTC