/

CVE-2026-35574

Severity:

HIGH RISK

(7.3)

Stored Cross-Site Scripting (XSS) in ChurchCRM Note Editor

CVE-2026-35574

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Account Compromise and Data Exposure via Client-Side Code Execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored Cross-Site Scripting (XSS) flaw in ChurchCRM's Note Editor allows authenticated users who can add notes to inject arbitrary JavaScript into content viewed by other users.

When these crafted notes are rendered in a browser, the attacker's script executes in the victim's session, potentially enabling session hijacking, privilege escalation, and unauthorized access to sensitive member data.

Affected context

The vulnerability appears in the Note Editor feature of ChurchCRM, where user-supplied note content is stored server-side and later displayed to other users in the web UI.

It becomes relevant in deployments where:

  • Multiple authenticated users can create or edit notes, and
  • Notes are subsequently viewed by higher-privileged users (such as administrators or staff).

The issue arises when note content is rendered without robust output encoding or sanitization in one or more display contexts (e.g., detail views, activity streams, or dashboards).

Exploit preconditions

  • Attack surface: Web interface of ChurchCRM, specifically the Note Editor and any pages that display stored notes.
  • Required access: Authenticated user account with permissions to create or modify notes.
  • Trigger point: A victim user (potentially an administrator) visits any page that renders the malicious note content in their browser.
  • Why exploitation is possible: The application stores untrusted note content and later injects it into HTML responses without consistently applying contextual output encoding or sanitization, allowing embedded script constructs to execute.

Why this happens

This vulnerability is rooted in improper neutralization of user-controlled input before it is included in a web page, corresponding to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

The Note Editor accepts rich text or HTML-like content, stores it, and then reflects it back into pages where the browser interprets it as active markup.

Without strict server-side sanitization and context-aware output encoding, attacker-supplied content can break out of intended formatting and introduce executable JavaScript, leveraging the victim's authenticated session and permissions.

Potential impact

  • Hijacking of user or administrator sessions via stolen cookies or session tokens.
  • Unauthorized actions performed on behalf of administrators (e.g., privilege changes, configuration updates).
  • Exposure or exfiltration of sensitive church member data and internal notes.
  • Manipulation or defacement of CRM content and UI elements for other users.
  • Establishment of persistent browser-based backdoors via stored malicious scripts.

General mitigation guidance

Effective mitigation typically focuses on hardening the handling of rich text and stored user content:

  • Apply context-aware output encoding to all note fields when rendering them into HTML, attributes, JavaScript, or URLs.
  • Introduce server-side HTML sanitization for notes, allowing only a minimal, well-defined set of safe tags and attributes if rich text is required.
  • Prefer storing notes as plain text and render them safely, using libraries that escape markup by default.
  • Centralize template rendering using frameworks or helpers that default to escaping, requiring explicit opt-out for trusted HTML only.
  • Enforce principle of least privilege on note-creation roles so that high-impact areas are not broadly writable.
  • Consider Content Security Policy (CSP) to reduce the impact of any remaining XSS vectors by limiting script execution sources.

How teams detect issues like this

Detection generally combines code inspection and behavioral monitoring:

  • Perform static code analysis to identify locations where note content or similar fields are inserted into templates without escaping (e.g., raw HTML render calls).
  • During code review, flag any use of "unsafe" rendering functions, HTML concatenation, or direct insertion of user content into script blocks or event handlers.
  • Use automated security testing (DAST) that attempts XSS payloads in note fields and verifies whether they execute upon viewing.
  • Implement logging and anomaly detection for unusual administrative actions or repeated note views that may indicate successful XSS exploitation.
  • Periodically scan templates and view components for bypasses of the standard encoding/sanitization utilities.

Sources

SourceLink
github.comgithub.com/ChurchCRM/CRM/security/advisories/GHSA-cx82-8xrh-7f5c

Frequently asked

questions

Yes, if the ChurchCRM instance is exposed over the internet and an attacker can obtain or abuse an authenticated account with note-adding permissions, they can exploit this issue by sharing or embedding links that cause other users to view the malicious note.

No. Exploitation requires only a user account that can create or edit notes. However, the highest impact occurs when administrators or other privileged users view the crafted notes, allowing the injected script to act with their permissions.

The safest pattern is to treat all note content as untrusted: enforce server-side HTML sanitization for any rich text, use context-aware output encoding everywhere notes are rendered, and avoid raw/unsafe rendering APIs. Consolidating all note rendering through a single, well-tested encoding/sanitization layer helps ensure consistent protection.

Adopt a secure-by-default templating system, mandate context-aware encoding for all user-controlled data, and restrict or sanitize any HTML input fields. Combine these with automated SAST/DAST in the CI pipeline, security-focused code reviews, and where feasible, defense-in-depth measures like Content Security Policy and stringent role/permission design.

Find out what's already
exploitable in your codebase.