CVE-2026-94471churchcrm/crm Cross-site Scripting (XSS)
NVD
Vulnerability Summary
1. Summary `window.CRM.renderPersonActionMenu` encodes the person name with `window.CRM.escapeHtml` at `src/skin/js/CRMJSOM.js:428` and then concatenates the result into a quoted HTML attribute at `:487-488`: `data-person_name="' + escapedName + '"`. That encoder does not encode the double quote, so a person whose stored name contains one closes the attribute and everything after it is parsed as further attributes on the same element. The helper is shared, so a single poisoned name reaches three surfaces, one of which is the main dashboard every administrator loads. `alert(document.domain)` fires in a real Chrome session authenticated as `Admin`, on `/v2/dashboard`, after `tony.wade` (`usr_Admin=0`) saves the name through `PersonEditor.php`. 2. Severity / CVSS `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N` — 8.7 (High) - `PR:L`: storing the payload needs only `usr_EditRecords`; the account used had `usr_Admin=0`. - `UI:R`: the handler is in the DOM from page load, but sits in a Bootstrap dropdown inside a tab pane, so the administrator opens the tab and the action menu before the pointer can reach it. Both are ordinary steps on the way to the Delete action. - `S:C`: the script runs with the viewing administrator's session authority, a different scope from the attacker's account. - CSP is emitted report-only by default (`bEnforceCSP` false), so inline handlers execute. Under an enforcing header this degrades to defacement rather than script execution. - `PersonEditor.php` stores a literal backslash before the quote, visible as `Campbell\"` in `person_per`. A backslash has no meaning in HTML, so the attribute still terminates at the quote (section 6.B). Preconditions: any account with `EditRecords` or `AddRecords`; an administrator loads `/v2/dashboard` and opens the action menu on the poisoned row. Default configuration. CWE-79 Improper Neutralization of Input During Web Page Generation. CWE-116 Improper Encoding or Escaping of Output. 3. Affected component - `src/skin/js/CRMJSOM.js:428`, the encoder choice: `const escapedName = window.CRM.escapeHtml(personName || "")` - `src/skin/js/CRMJSOM.js:487-488`, sink: `' data-person_name="' + escapedName + '"'` - `src/skin/js/CRMJSOM.js:16-23` `window.CRM.escapeHtml`, `div.textContent = text; return div.innerHTML`, which leaves `"` intact - `src/skin/js/CRMJSOM.js:32-37` `window.CRM.escapeAttribute`, intent: added for exactly this context - Call sites reached by the same helper: `src/skin/js/MainDashboard.js:448-451` (`/v2/dashboard` person widgets), `src/people/views/self-register.php:162`, `src/v2/templates/email/without.php:112` - Storage path: `src/PersonEditor.php` writes `per_LastName` through `InputUtils::legacyFilterInput`, which strips tags and preserves quotes - `src/Include/Header-Security.php:78-82`, the header emitted is `Content-Security-Policy-Report-Only` unless `bEnforceCSP` is set Affected versions: 7.6.0 confirmed, the latest release at the time of testing, commit `24869b1e6f5e9b4ac5cfb75c4817095755042320`. `escapeAttribute` was introduced in the 7.4.3 remediations without converting this renderer, so the sink is at least that old; lower bound not bisected. Environment: stock `docker/docker-compose.dev.yaml` — PHP 8.4, MariaDB 10.11.18, Apache — at `http://localhost:8099`, frontend built from the same tree. `bEnforceCSP` at its shipped default of off; no application source modified. Viewing browser was Chrome driven by Playwright. 4. Root cause Two facts combine. 1. The encoder is text-node encoding. `escapeHtml` round-trips through `textContent`/`innerHTML`, which encodes `<`, `>` and `&` and leaves `"` alone. ```js window.CRM.escapeHtml = (text) => { ... div.textContent = text; return div.innerHTML; }; // CRMJSOM.js:16-23 ``` 2. Its output lands in a quoted attribute. One call, three consuming pages. ```js const escapedName = window.CRM.escapeHtml(personName || ""); // CRMJSOM.js:428 ... ' data-person_name="' + escapedName + '"' // CRMJSOM.js:487-488 ``` Precedent: `escapeAttribute` exists two dozen lines above the defect, at `CRMJSOM.js:32-37`, and its doc comment names the advisory that prompted it. The shared renderer was not converted with the call sites. Guard works where applied; `escapeHtml` is the right encoder for the text-node halves of the same template and the wrong one here. 5. Impact - Non-admin to admin script execution on the default landing page. `document.domain` read back as `localhost` from a dialog raised in a session authenticated as `Admin`, on `/v2/dashboard`. - One stored value, three surfaces. The dashboard person widgets, the self-registration review list and the email-recipient list all call the same renderer, so a single poisoned name is delivered to whichever an operator opens first. - Attribute injection, not tag injection. The payload contains no `<`, so the tag-stripping write filter is a no-op on it. - Same-origin with the victim's cookie. The injected handler can call any endpoint the viewing administrator can, including `/admin/api/user/{id}/password/reset`. - No CSP obstacle in the default build. The response carries `Content-Security-Policy-Report-Only`; no enforcing header is sent. 6. Proof of Concept `04-poc.py` performs A through C. It is given the non-admin credentials and the administrator credentials; it reads no secret from the database. A. Store the payload as a non-admin `tony.wade` has `usr_Admin=0`, `usr_EditRecords=1`. The `PersonEditor.php` form for person 2 is replayed with the surname replaced. The same request sets the birthday to today, which an `EditRecords` account may already do, so the row appears in the dashboard's birthday widget. ``` LastName=Campbell" onmouseover=alert(document.domain) x=" PersonSubmit=Save store payload as non-admin -> 200 ``` ``` $ docker compose -f docker/docker-compose.dev.yaml exec -T database \ mysql -uchurchcrm -pchangeme churchcrm -N \ -e "SELECT per_ID, per_LastName FROM person_per WHERE per_ID=2;" 2 Campbell\" onmouseover=alert(document.domain) x=\" ``` B. Render in an administrator's browser Real Chrome, logged in through `POST /session/begin` as `Admin`, navigated to `/v2/dashboard`, opened the People card's birthday tab, opened the row's action menu, moved the pointer onto the Delete entry. ``` $ python3 04-poc.py store payload as non-admin -> 200 [payload] data-person_name : 'Mathew Campbell\\' [payload] parsed onmouseover attr: 'alert(document.domain)' [payload] dialogs captured : ['localhost'] ``` `data-person_name` ends at the injected quote, and the browser exposes `onmouseover` as a real attribute holding `alert(document.domain)`. The captured dialog text is the origin the script read, so this is handler execution rather than unescaped source text. C. Control, benign value, same account and same page ``` store benign as non-admin -> 200 [control] data-person_name : 'Mathew Campbell' [control] parsed onmouseover attr: None [control] dialogs captured : [] ``` Stored value `Campbell` renders as `data-person_name="Mathew Campbell"`, no second attribute, no dialog. The quote, not the presence of user data, is what breaks the attribute. A through C reproduced at commit `24869b1e`. 7. Recommended fix 1. `CRMJSOM.js:428`: encode with the attribute encoder that already exists in the same file. ```js const escapedName = window.CRM.escapeAttribute(personName || ""); ``` 2. `CRMJSOM.js:579` feeds `data-event_title="' + escapedTitle + '"` at `:631-632` through the same quote-unsafe helper. It carries an event title, writable by an account with `bAddEvent`, and renders for administrators on the event list (`src/event/views/list-events.php:363`) and the dashboard (`MainDashboard.js:678`). Convert it in the same change. 3. Retire the bare `escapeHtml`-into-attribute pattern across `src/skin/js/`, so the choice of encoder is explicit at each call site. 4. Reject control and quote characters in person name fields on write, rather than relying on output encoding alone. Fix 1 is the defect. Fix 2 is the sibling sink in the same helper file. Fixes 3 and 4 are hardening. 8. Distinction from prior advisories - `GHSA-369j-c5w2-48m4` (fixed 7.4.3): the `title` attribute at `MainDashboard.js:120,123` carrying a family address. Its fix introduced `escapeAttribute` at `CRMJSOM.js:32-37` and converted those two call sites; `renderPersonActionMenu`, in the same file as the new helper, was left on `escapeHtml`. - `GHSA-mfmp-q643-vj39` (fixed 7.4.3): `GroupView.js` and `GroupRoles.js`, group role names, text context. Its remediation prescribes `escapeHtml`, the encoder that fails here. - `GHSA-4qpj-3hw2-52g8` and `GHSA-5g9h-6xrp-gpqq`: `users.js` bootbox callbacks and server-side person-name output in `person-view.php`/`family-view.php`. Neither names `CRMJSOM.js:423-495`. - The `GroupView.js` attribute sinks (`:771-772`, `:782-783`, `:794`/`:824-825`) take the same encoder into `tel:`, `mailto:` and `data-name`: different file, renderer and fields. A fix to either file leaves the other exploitable.
CVSS v3.1 Base Metrics — Score 8.7
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:NAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionRequired
ScopeChanged
ConfidentialityHigh
IntegrityHigh
AvailabilityNone
Affected & Patched Versions
- churchcrm/crm 7.5.1
- churchcrm/crm 7.6.0
What to do
Prioritize this fix. Exploit code is public, so attacks can follow quickly.
- Check whether you run churchcrm/crm and which version.
- Update to a patched version listed above, then confirm the new version.
- Review logs and exposed services for signs of earlier compromise.
Timeline
- Aug 10, 2026Published
- Aug 10, 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-94471. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Nov 25, 2026 14:01 UTC