CVE Watchtower

CVE-2026-94481churchcrm/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 person profile view. Phone numbers (cell, home, work) and email addresses retrieved from the database are echoed into HTML body context without `escapeHTML()`. While the corresponding `href` attributes on the same elements correctly use `escapeAttribute()`, the visible link text is unescaped. An admin who imports a CSV record with a crafted phone or email value can store an HTML payload that fires in the browser of any authenticated user who subsequently views that person's profile. Details Sinks — four unescaped body-context echoes: `src/people/views/person-view.php:122` ```php <a href="tel:<?= InputUtils::escapeAttribute($sCellPhoneUnformatted) ?>"><?= $sCellPhone ?></a> ``` `src/people/views/person-view.php:138` ```php <a href="tel:<?= InputUtils::escapeAttribute($sHomePhoneUnformatted) ?>"><?= $sHomePhone ?></a> ``` `src/people/views/person-view.php:150` ```php <a href="tel:<?= InputUtils::escapeAttribute($sWorkPhoneUnformatted) ?>"><?= $sWorkPhone ?></a> ``` `src/people/views/person-view.php:171` ```php <a href="mailto:<?= InputUtils::escapeAttribute($sUnformattedEmail) ?>" ...><?= $sEmail ?></a> ``` The `href` attribute is correctly escaped with `escapeAttribute()`, but the anchor body (`$sCellPhone`, `$sHomePhone`, `$sWorkPhone`, `$sEmail`) is printed raw. Data flow — display variables are raw DB reads, no formatting applied: `src/people/routes/view.php:174–181` ```php $sCellPhone = $personData['per_CellPhone'] ?? ''; $sCellPhoneUnformatted = $personData['per_CellPhone'] ?? ''; $sHomePhone = $personData['per_HomePhone'] ?? ''; $sHomePhoneUnformatted = $personData['per_HomePhone'] ?? ''; $sWorkPhone = $personData['per_WorkPhone'] ?? ''; $sWorkPhoneUnformatted = $personData['per_WorkPhone'] ?? ''; $sEmail = $personData['per_Email'] ?? ''; $sUnformattedEmail = $personData['per_Email'] ?? ''; ``` `$sCellPhone` và `$sCellPhoneUnformatted` giống hệt nhau — cả hai đều là giá trị raw từ DB. Không có phone formatter nào được áp dụng giữa DB read và HTML output. Why `legacyFilterInput` / `strip_tags` is insufficient at input-time: - `strip_tags` runs at write-time via `PersonEditor.php:205–208` (`legacyFilterInput`) and removes HTML tags before saving. Direct input via PersonEditor UI is therefore blocked. - The email field additionally runs `MiscUtils::checkEmail()` validation — an HTML payload fails this check and is rejected outright. - However, the CSV import path (`admin/routes/api/import.php:743–746`) calls Propel setters (`$person->setCellPhone()`, `$person->setEmail()`, etc.) directly, with no sanitization — the setter only casts to `(string)`. A payload stored via CSV import reaches the database intact and triggers on any subsequent profile view. - The correct model is store-raw / encode-at-output. The `href` side of the same element already demonstrates this with `escapeAttribute()` — the body side omits it. Mailing address — additional sink: `src/people/views/person-view.php:473` ```php <a href="https://maps.google.com/?q=<?= urlencode($plaintextMailingAddress) ?>" target="_blank" rel="noopener noreferrer"><?= $formattedMailingAddress ?></a> ``` `$formattedMailingAddress` echoed raw without `escapeHTML()` in the anchor body. Same root cause, same fix. PoC Requires: Admin account (CSV Import feature is Admin-only). Trigger: XSS fires for any authenticated user who opens the victim person's profile — no interaction required beyond page load. Payload size constraints (varchar limits): | Field | DB column | Limit | Payload used | |---|---|---|---| | MobilePhone | `per_CellPhone` | varchar(30) | `<img src=x onerror=alert(1)>` (28 chars) | | Email | `per_Email` | 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_rc4.csv` (encoding UTF-8): ```csv FamilyID,FirstName,LastName,MobilePhone,Email ,XSSTest,Victim-RC4,<img src=x onerror=alert(1)>,victim@test.local ``` > The `MobilePhone` column in the CSV is mapped to `per_CellPhone` in the DB. Import by calling `$person->setCellPhone($data['MobilePhone'])` directly — not through `strip_tags()`. --- Step 4 — Upload CSV On the `/admin/import/csv` page: 1. Click "Choose File" → select `xss_rc4.csv` 2. 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 | | MobilePhone | Mobile Phone | | Email | Email | Click "Import" to confirm. Success message: `Imported: 1 record`. --- Step 6 — XSS Trigger Access (with any logged-in session): Access People → search for "XSSTest" → click on the imported person. Destination URL: `http://localhost/people/view/<ID>` `alert(1)` pops up as soon as the page loads Actual HTML in the response `/people/view/<ID>`: ```html <a href="tel:<img src=x onerror=alert(1)"> <img src=x onerror=alert(1)> </a> ``` - `href`: safe — `escapeAttribute()` encode to `<img...>` - anchor body: raw — `<img src=x>` load failed → `onerror` fires → `alert(1)` executes --- Impact - Type: CWE-79 — Stored Cross-Site Scripting (HTML body, anchor text). CVSS 3.1 ≈ 6.1 (AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N). - Who can plant it: Admin user — via CSV Import (`Admin → Get Started → Import from a Spreadsheet`). The standard PersonEditor UI applies `strip_tags()` and email validation, blocking direct injection through the edit form. - Who is affected: Any authenticated user who views the affected person's profile page. - Consequence: Arbitrary JavaScript in victim's session; session/credential theft; forced admin actions. Because the profile page is a routine workflow for all staff, a single poisoned person record reliably reaches multiple victims. Suggested Fix File: `src/people/views/person-view.php` Line 122 — cell phone: Before (vulnerable): ```php <a href="tel:<?= InputUtils::escapeAttribute($sCellPhoneUnformatted) ?>"><?= $sCellPhone ?></a> ``` After (fixed): ```php <a href="tel:<?= InputUtils::escapeAttribute($sCellPhoneUnformatted) ?>"><?= InputUtils::escapeHTML($sCellPhone) ?></a> ``` Line 138 — home phone: Before (vulnerable): ```php <a href="tel:<?= InputUtils::escapeAttribute($sHomePhoneUnformatted) ?>"><?= $sHomePhone ?></a> ``` After (fixed): ```php <a href="tel:<?= InputUtils::escapeAttribute($sHomePhoneUnformatted) ?>"><?= InputUtils::escapeHTML($sHomePhone) ?></a> ``` Line 150 — work phone: Before (vulnerable): ```php <a href="tel:<?= InputUtils::escapeAttribute($sWorkPhoneUnformatted) ?>"><?= $sWorkPhone ?></a> ``` After (fixed): ```php <a href="tel:<?= InputUtils::escapeAttribute($sWorkPhoneUnformatted) ?>"><?= InputUtils::escapeHTML($sWorkPhone) ?></a> ``` Line 171 — email: Before (vulnerable): ```php <a href="mailto:<?= InputUtils::escapeAttribute($sUnformattedEmail) ?>" ...><?= $sEmail ?></a> ``` After (fixed): ```php <a href="mailto:<?= InputUtils::escapeAttribute($sUnformattedEmail) ?>" ...><?= InputUtils::escapeHTML($sEmail) ?></a> ``` Line 473 — mailing address anchor body: Before (vulnerable): ```php <a href="https://maps.google.com/?q=<?= urlencode($plaintextMailingAddress) ?>" target="_blank" rel="noopener noreferrer"><?= $formattedMailingAddress ?></a> ``` After (fixed): ```php <a href="https://maps.google.com/?q=<?= urlencode($plaintextMailingAddress) ?>" target="_blank" rel="noopener noreferrer"><?= InputUtils::escapeHTML($formattedMailingAddress) ?></a> ``` > The `href`-side `escapeAttribute()` calls are already correct and do not need to change. Only the anchor body echoes require the fix — five one-token changes in a single file.
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-94481. 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