/

CVE-2026-35576

Severity:

HIGH RISK

(8.7)

Stored XSS in ChurchCRM Person Property Management

CVE-2026-35576

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Session Hijacking and Account Compromise via Stored XSS

Severity:

HIGH RISK

(8.7)

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

ChurchCRM versions prior to 7.0.0 contain a stored cross-site scripting (XSS) vulnerability in the Person Property Management subsystem that allows authenticated users to inject arbitrary JavaScript into dynamically assigned person properties.

The payload is saved in the database and later executed in the browser of other users who view the affected person profile or its printable view, which can lead to session hijacking or full account compromise.

Affected context

The vulnerability arises in ChurchCRM deployments where authenticated users can manage or assign person properties and where those property values are rendered into profile views or printable views without robust output encoding.

It is specifically tied to the Person Property Management subsystem and affects scenarios where user-supplied values are persisted in the database and later displayed in HTML contexts viewed by other authenticated users, such as staff or administrators.

Exploit preconditions

  • Attack surface: Web application interface for managing or editing person properties within ChurchCRM.
  • Required access: Authenticated user account with permission to create or update dynamically assigned person properties.
  • Trigger point: Viewing of a person profile or printable view that includes the crafted property value.
  • Why exploitation is possible: The application stores user-controlled input and later injects it into HTML responses without consistently applying context-aware output encoding or sanitization, allowing embedded script content to execute in other users' browsers.

Why this happens

This issue is a classic example of CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

The core problem is that data from person properties—controlled by authenticated users—is treated as plain content but is rendered back into web pages without robust, context-sensitive escaping or encoding.

As a result, when malicious JavaScript or HTML fragments are stored in the database and later inserted into the DOM within profile or printable views, the browser interprets the data as executable script instead of inert text.

The vulnerable pattern is the mixing of untrusted, persistent user input directly into HTML output without a systematic encoding layer at render time.

Potential impact

  • Malicious JavaScript execution in the context of another user's session.
  • Session hijacking through theft of session tokens or authentication cookies (where accessible to scripts).
  • Full account takeover of privileged users who view the poisoned profile or printable view.
  • Unauthorized actions performed on behalf of victims via cross-site request forgery-like behavior initiated by injected scripts.
  • Harvesting of sensitive data viewed in the application, such as contact details or internal notes.
  • Lateral movement through the application by chaining compromised accounts.

General mitigation guidance

Effective mitigation focuses on treating all person property values as untrusted input and enforcing strict output encoding rules:

  • Apply context-aware output encoding (e.g., HTML-encoding, attribute-encoding, JavaScript-encoding) at every point where user-controlled data is rendered into a page, rather than relying solely on input filtering.
  • Introduce a consistent templating or view layer that automatically escapes output by default, requiring explicit opt-out only for deliberately safe HTML.
  • Restrict where rich HTML is allowed; prefer plain text fields for properties and avoid mixing markup with user-generated content unless a robust sanitizer is in place.
  • Use a vetted HTML sanitization library if rich text is required, configured to strip scriptable constructs, event handlers, and dangerous protocols.
  • Enforce least-privilege principles for user roles that can manage person properties to reduce the impact of a compromised or malicious account.
  • Consider enabling security headers such as Content Security Policy (CSP) to reduce the blast radius of any remaining injection points.

How teams detect issues like this

Detection typically combines code-level analysis with behavioral testing:

  • Static analysis: Scan server-side and template code for direct insertion of person property values into HTML, attributes, or script contexts without passing through a standard encoding function.
  • Code review: Flag any render paths where user-controlled values (especially from person properties) are interpolated into views, PDFs, or printable output without explicit escaping.
  • Security testing: Use automated and manual penetration tests to submit benign XSS probes in person properties and verify whether they reappear unencoded in rendered pages.
  • Policy enforcement: Adopt secure coding policies requiring default-escaping view engines and centralized helpers for all output of user-supplied data; integrate these checks into CI pipelines using linters or SAST tools.

Sources

SourceLink
github.comgithub.com/ChurchCRM/CRM/pull/8016
github.comgithub.com/ChurchCRM/CRM/security/advisories/GHSA-8r36-fvxj-26qv

Frequently asked

questions

Yes, if the ChurchCRM instance is exposed over the internet and an attacker can obtain or abuse an authenticated account with permission to edit person properties. The malicious payload then executes in other users' browsers when they view the affected records.

Not necessarily. The attacker needs an authenticated role that can create or modify person properties. If lower-privileged accounts have this capability, they can leverage the vulnerability against higher-privileged users who later view the tampered profiles.

The most reliable fix is to enforce centralized, context-aware output encoding for all user-supplied data, including person properties, so that any stored content is treated as text rather than executable code. Complement this with strict sanitization for fields that must support richer formatting.

Use templating systems that escape by default, establish coding standards that forbid raw output of user-controlled data, and include XSS-focused checks in code review and automated testing. Additionally, design data models so that fields intended for user content are rendered through common helpers that consistently apply output encoding and optional sanitization.

Find out what's already
exploitable in your codebase.