Summary
ChurchCRM contains a reflected cross-site scripting (XSS) issue where the FindFundRaiser.php endpoint echoes user-controlled DateStart and DateEnd parameters into HTML input attributes without proper encoding.
An authenticated attacker can craft a malicious URL that, when opened by another authenticated user, executes arbitrary JavaScript in their browser within the ChurchCRM context.
Affected context
The vulnerability occurs in the FindFundRaiser.php page of ChurchCRM, specifically where DateStart and DateEnd request parameters are rendered back into HTML input field attributes.
It is relevant in deployments where:
- Users are authenticated into ChurchCRM
- The application reflects query parameters into the page without applying HTML attribute-level output encoding
- Users may click or be persuaded to click on URLs crafted by other authenticated users
Exploit preconditions
- Attack surface: Web interface, FindFundRaiser.php endpoint
- Required access: Attacker must be an authenticated ChurchCRM user able to generate or share URLs
- Trigger point: Victim (another authenticated user) visits a maliciously crafted URL containing specially crafted DateStart/DateEnd parameters
- Why exploitation is possible: User-supplied values are inserted directly into HTML input attributes without proper context-aware escaping, allowing injection of JavaScript that the browser interprets as active script
Why this happens
This issue stems from improper output encoding of untrusted input in a web page, aligning with CWE-79 (Improper Neutralization of Input During Web Page Generation).
The FindFundRaiser.php endpoint takes DateStart and DateEnd parameters from the request and writes them into HTML input attributes as-is or with insufficient sanitization.
Because the encoding does not account for the HTML attribute context, an attacker can break out of the attribute and inject script code, which the browser then executes within the application's origin.
Potential impact
- Theft of session identifiers or other sensitive data accessible in the browser
- Impersonation of the victim user within ChurchCRM
- Unauthorized actions performed on behalf of the victim (e.g., changing records, viewing or modifying church member data)
- Injection of rogue UI elements or phishing prompts inside the ChurchCRM interface
- Potential pivoting to other attacks relying on the compromised user's privileges
General mitigation guidance
Effective mitigation focuses on enforcing strict, context-aware output encoding and minimizing the trust placed in client-supplied data.
Common defensive patterns include:
- Applying HTML attribute-specific encoding when inserting user-controlled values into attribute values
- Centralizing output encoding in helper functions or templating frameworks that apply the correct encoding by default
- Limiting which characters are allowed in date-related inputs and validating them against a strict server-side format
- Avoiding direct string concatenation when constructing HTML and using framework templating features that escape by default
- Applying the principle of least privilege for user accounts, so that impact of any successful XSS is reduced
How teams detect issues like this
Organizations can identify similar vulnerabilities by:
- Running static analysis tools configured with rules for detecting unencoded or improperly encoded output in HTML and attribute contexts
- Reviewing server-side templates and PHP views for instances where request parameters are echoed directly into HTML, especially into attributes and script blocks
- Establishing secure coding guidelines that mandate context-aware escaping and verifying adherence during peer code reviews
- Integrating dynamic application security testing (DAST) into CI pipelines to probe parameters like DateStart/DateEnd for reflective behaviors

