CVE Watchtower

CVE-2026-94475churchcrm/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 profile view. The family's mailing address and directions URL are echoed into HTML without output encoding — the address into the anchor body, and the directions URL directly into an `href` attribute. An administrator who imports a CSV file can store a crafted address that injects HTML into the family record, executing JavaScript in the browser of any authenticated user who views that family. > Write path note: `FamilyEditor.php` (UI form) applies `legacyFilterInput()` → `strip_tags()` on `$_POST['Address1']` (line 84), which strips all HTML tags and blocks injection via the standard edit form. The confirmed write path is CSV Import (`Admin → Get Started → Import from a Spreadsheet`), which calls `$family->setAddress1($data['Address1'])` directly (import.php:688) — no sanitization applied. Details Sinks — address body and href unescaped: `src/people/views/family-view.php:428–429` ```php <a href="https://maps.google.com/?q=<?= urlencode($familyAddress) ?>" target="_blank" rel="noopener noreferrer"><?= $familyAddress ?></a> ``` `$familyAddress` in the `href` is URL-encoded (safe there), but the anchor body `<?= $familyAddress ?>` is raw. `src/people/views/family-view.php:434` ```php <a href="<?= $directionsUrl ?>" target="_blank" rel="noopener noreferrer" class="btn btn-sm btn-outline-primary"> ``` `$directionsUrl` is built from `$family->getDirectionsUrl()` which constructs a maps URL from the stored address. If the address contains `"` the attribute closes, escaping the href context. Data flow: - `family-view.php:17`: `$familyAddress = $family->getAddress()` — concatenates raw DB fields (Address1, Address2, City, State, Zip, Country) - `Family::getAddress()` reads `getAddress1()` → raw DB value, no encoding - `Family::setAddress1()` (Base/Family.php:866): only casts `(string)$v` — no sanitization PoC Requires: Admin account (CSV Import feature is Admin-only). Trigger: XSS fires for any authenticated user who opens the victim family's profile — no interaction required beyond page load. Payload size constraints (varchar limits): | Field | DB column | Limit | Payload used | |---|---|---|---| | Address1 | `fam_Address1` | varchar(255) | `<img src=x onerror=alert(document.domain)>` (43 chars) | > Lưu ý: Cột `FamilyID` trong CSV bắt buộc phải có giá trị khác rỗng. Import chỉ tạo Family record (và ghi Address vào `family_fam`) khi `FamilyID` được cung cấp — không có `FamilyID` thì chỉ tạo Person record và Address đi vào `person_per`, không ảnh hưởng đến `family-view.php`. 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_family.csv` (encoding UTF-8): ``` FirstName,LastName,FamilyID,Address1,City,State,Zip,Country XSS,Test,9001,"<img src=x onerror=alert(document.domain)>",TestCity,CA,12345,USA ``` The `Address1` column is mapped to `fam_Address1` in the DB. Import calls `$family->setAddress1($data['Address1'])` directly (`import.php:688`) — bypasses `strip_tags()` entirely. Step 4 — Upload CSV On the `/admin/import/csv` page: Click "Choose File" → select `xss_family.csv` Click "Upload" Step 5 — Map Columns and Confirm Import The interface displays the column mapping table. Check that the columns are mapped correctly: | CSV Column | ChurchCRM Field | |---|---| | FirstName | First Name | | LastName | Last Name | | FamilyID | Family ID | | Address1 | Address 1 | | City | City | | State | State | | Zip | Zip Code | | Country | Country | Click "Import" to confirm. Success message: `Imported: 1 record.` Step 6 — XSS Trigger Navigate to People → Families → search for "Test" → click on the imported family. Destination URL: `http://localhost/people/family/<ID>` `alert(document.domain)` pops up as soon as the page loads. Actual HTML in the response `/people/family/<ID>`: ```html <!-- family-view.php:429 — anchor body, raw echo: --> <a href="https://maps.google.com/?q=%3Cimg+src%3Dx+onerror%3Dalert%28document.domain%29%3E+TestCity..." target="_blank" rel="noopener noreferrer"> <img src=x onerror=alert(document.domain)> TestCity, CA 12345 USA </a> ``` - `href`: safe — `urlencode()` encodes payload to `%3Cimg...%3E` - anchor body: raw — `<img src=x>` load fails → `onerror` fires → `alert(document.domain)` executes Impact - Type: CWE-79 — Stored XSS (HTML body + href attribute). CVSS 3.1 ≈ 5.5 (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: Any staff member or administrator who views the family profile. - Consequence: Arbitrary JavaScript execution; session theft; forced actions in victim's authenticated context. Suggested Fix File: `src/people/views/family-view.php` Lines 428–429 — address anchor body: Before (vulnerable): ```php <a href="https://maps.google.com/?q=<?= urlencode($familyAddress) ?>" target="_blank" rel="noopener noreferrer"><?= $familyAddress ?></a> ``` After (fixed): ```php <a href="https://maps.google.com/?q=<?= urlencode($familyAddress) ?>" target="_blank" rel="noopener noreferrer"><?= InputUtils::escapeHTML($familyAddress) ?></a> ``` Line 434 — directionsUrl href attribute: Before (vulnerable): ```php <a href="<?= $directionsUrl ?>" target="_blank" rel="noopener noreferrer" class="btn btn-sm btn-outline-primary"> ``` After (fixed): ```php <a href="<?= InputUtils::escapeAttribute($directionsUrl) ?>" target="_blank" rel="noopener noreferrer" class="btn btn-sm btn-outline-primary"> ``` > `urlencode()` on the query string part of the Google Maps `href` is not affected — that call remains as-is. Only the anchor body (line 429) and the directions button `href` (line 434) need the escaping wrappers added.
Severity Level
MEDIUM
Published Date
Aug 14, 2026
Last Modified
Aug 14, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Reserved
This CVE ID is referenced in a public advisory, but the CVE Program has not published its official CVE Record yet. Full CVSS/CPE data from NVD will appear here once it does.
Root Weakness (CWE)
The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.

Affected & Patched Versions

Affected Versions
  • churchcrm/crm < 7.6.0
Patched Versions
  • churchcrm/crm 7.6.0

What to do

Fix it during your normal patch cycle. No exploitation is confirmed yet.

  1. Check whether you run churchcrm/crm and which version.
  2. 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-94475. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Nov 24, 2026 08:00 UTC