CVE Watchtower

CVE-2026-94472churchcrm/crm Cross-site Scripting (XSS)

NVD

Vulnerability Summary

1. Summary Three DataTables render callbacks in `src/skin/js/GroupView.js` build HTML attributes by concatenating `$("<div>").text(v).html()` output: the `tel:` href at `:771-772`, the `mailto:` href at `:782-783`, and `data-name` at `:794`/`:824-825`. That idiom encodes `<`, `>` and `&` but not `"`, so a stored value containing a double quote closes the attribute and the remainder is parsed as further attributes. A person's cell phone, email or full name — writable by any account with `EditRecords`, no admin rights — therefore becomes a live event handler in the browser of every user who opens the group, including an administrator. The encoder in use is the inline equivalent of `window.CRM.escapeHtml`. That helper's own doc comment at `src/skin/js/CRMJSOM.js:24-31` records that it does not encode quotes, which is why `escapeAttribute` was added beside it at `:32`. Neither named helper is called at these three sinks; the idiom is spelled out inline instead. `alert(1)` fires in a real Chrome session authenticated as `Admin` after `tony.wade` (`usr_Admin=0`) saves the payload. 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 proven variant fires on hover. The `data-name` sink in the same row takes `autofocus onfocus=`, which needs no interaction and would score `UI:N`, 9.0. The lower score is claimed. - `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. Preconditions: any account with `EditRecords` or `AddRecords`; attacker and victim share a group; the victim opens `/groups/view/{id}`. 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/GroupView.js:771-772` `render` for `Person.CellPhone`, sink: `'<a href="tel:' + escaped + '">'` - `src/skin/js/GroupView.js:782-783` `render` for `Person.Email`, sink: `'<a href="mailto:' + escaped + '"'` - `src/skin/js/GroupView.js:794`, `:824-825` action-menu `render`, sink: `data-name="' + escapedName + '"` - `src/skin/js/CRMJSOM.js:16-23` `window.CRM.escapeHtml`, the encoder in use: `div.textContent = text; return div.innerHTML` - `src/skin/js/CRMJSOM.js:24-37` `window.CRM.escapeAttribute`, intent: exists precisely because `escapeHtml` leaves quotes intact - `src/ChurchCRM/utils/InputUtils.php:35-38` `sanitizeText`, storage filter: `strip_tags(trim())`, so a tag-free payload passes - `src/Include/Header-Security.php:78-82`, the header emitted is `Content-Security-Policy-Report-Only` unless `bEnforceCSP` is set - Data path: `GET /api/groups/{id}/members` returns the stored value; DataTables passes it to the render callbacks above Affected versions: 7.6.0 confirmed, the latest release at the time of testing, commit `24869b1e6f5e9b4ac5cfb75c4817095755042320`. The 7.4.3 remediations that introduced `escapeAttribute` did not convert these sinks, so they are 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, not attribute encoding. `escapeHtml` round-trips through `textContent`/`innerHTML`, which leaves `"` untouched. ```js window.CRM.escapeHtml = (text) => { ... div.textContent = text; return div.innerHTML; }; // CRMJSOM.js:16-23 ``` 2. Its output is concatenated into quoted attributes. Same file, three sinks, none using `escapeAttribute`. ```js var escaped = $("<div>").text(data).html(); return '<a href="tel:' + escaped + '">' + escaped + "</a>"; // GroupView.js:771-772 ``` Precedent: `src/skin/js/MainDashboard.js:120` already uses `window.CRM.escapeAttribute` for the one attribute it fills. Reuse it. Guard works where applied; `escapeHtml` is correct for the text-node halves of these same expressions and wrong for the attribute halves. 5. Impact - Non-admin to admin script execution. `alert(1)` captured from a Chrome dialog handler in a session authenticated as `Admin`; the parsed DOM attribute `onmouseover` read back as `alert(1)`. - Attribute injection, not tag injection. The payload `5" onmouseover=alert(1) x="` contains no `<`, so `strip_tags` 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` and user creation. - Three fields, one row. Cell phone, email and full name all reach attribute context from the same API response. 6. Proof of Concept A. Store the payload as a non-admin `tony.wade` has `usr_Admin=0`, `usr_EditRecords=1`. The PersonEditor form for person 2 is replayed with one field changed. ``` CellPhone=5" onmouseover=alert(1) x=" PersonSubmit=Save HTTP/1.1 200 ``` B. The API hands the raw quote to the client ``` $ curl -s -H 'x-api-key: <admin key>' http://localhost:8099/api/groups/1/members ... "CellPhone":"5\" onmouseover=alert(1) x=\"" ... ``` C. Render in an administrator's browser Real Chrome, logged in through `POST /session/begin` as `Admin`, navigated to `/groups/view/1`, hovered the phone link. ``` $ python3 verify.py store payload as non-admin -> 200 [payload] parsed onmouseover attribute: 'alert(1)' [payload] dialogs captured: ['1'] ``` The browser exposes `onmouseover` as a real attribute, so this is handler execution rather than unescaped source text. D. Control, benign value, same account and same page ``` store benign as non-admin -> 200 [control] parsed onmouseover attribute: None [control] dialogs captured: [] ``` Stored value `(003)-025-4087` renders as `<a href="tel:(003)-025-4087">`. The quote, not the presence of user data, is what breaks the attribute. E. No CSP obstacle ``` $ curl -sI http://localhost:8099/session/begin | grep -i content-security Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' 'nonce-42Mpi7KQ... ``` A through E reproduced at commit `24869b1e`. 7. Recommended fix 1. `GroupView.js:771-772`, `:782-783`, `:794`: use the attribute encoder for the attribute halves, keeping `escapeHtml` for the text halves. ```js const attr = window.CRM.escapeAttribute(data); const text = window.CRM.escapeHtml(data); return '<a href="tel:' + attr + '">' + text + "</a>"; ``` 2. Same substitution at the sibling attribute sinks found alongside these: `src/skin/js/GroupList.js:145` (`data-group-name`) and `src/skin/js/GroupEditor.js:259` (`value=`). 3. Retire the `$("<div>").text(v).html()` idiom in favour of the two named helpers, so the choice of encoder is visible at each call site. 4. `PeopleCustomField` and phone fields: validate phone-shaped input on write rather than relying on output encoding alone. Fix 1 is the defect for the reported sinks; fix 2 closes the identical sinks in the same subsystem. Fixes 3 and 4 are hardening. 8. Distinction from prior advisories - `GHSA-mfmp-q643-vj39` (fixed 7.4.3): `GroupView.js:724,742,756` and `GroupRoles.js:13`, group role names, text context. Its remediation prescribes `escapeHtml`, the encoder that fails here, so applying that fix would not close these sinks. - `GHSA-369j-c5w2-48m4` (fixed 7.4.3): `MainDashboard.js:120,123`, the `title` attribute, family address. Its fix produced `escapeAttribute`; `GroupView.js` was not converted. - `GHSA-frj8-mpcx-44g9` (fixed 7.4.3): the same `tel:` breakout technique, but a server-side PHP sink in `people/views/family-view.php` fixed with `InputUtils::escapeAttribute` in that template; it does not reach this JavaScript. - `GHSA-5g9h-6xrp-gpqq` and `GHSA-4qpj-3hw2-52g8`: person-name injection in `person-view.php`/`family-view.php` and in four `users.js` bootbox callbacks. Neither names `GroupView.js:771-825`, and `GHSA-4qpj-3hw2-52g8` cites `GroupView.js` as code that already escapes correctly.
Severity Level
HIGH(8.7)
Published Date
Aug 10, 2026
Last Modified
Aug 10, 2026
Exploitation Status
Public exploit available
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 software does not neutralize user-controllable input before it is placed in output that is used as a web page.
The product prepares a structured message for communication with another component, but encoding or escaping of the data is missing or incorrect.
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:N
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionRequired
ScopeChanged
ConfidentialityHigh
IntegrityHigh
AvailabilityNone

Affected & Patched Versions

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

What to do

Prioritize this fix. Exploit code is public, so attacks can follow quickly.

  1. Check whether you run churchcrm/crm and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. 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-94472. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Nov 25, 2026 14:01 UTC