/

CVE-2026-39344

Severity:

HIGH RISK

(8.1)

XSS in ChurchCRM Login Username Parameter

CVE-2026-39344

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79, CWE-80

Impact:

Client-Side Code Execution and Session Compromise

Severity:

HIGH RISK

(8.1)

CVSS version:

3.0

Catch this CVE while code is being written

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

Summary

A reflected cross-site scripting (XSS) flaw in the ChurchCRM login page allows untrusted data from the username URL parameter to be rendered without sanitization or encoding.

An attacker who can trick users into following a crafted login URL may execute JavaScript in the victim's browser, potentially stealing session cookies or presenting a fake login form.

Affected context

The vulnerability occurs on the ChurchCRM login page where the username parameter from the URL is echoed into an input element without output encoding.

It becomes relevant in contexts where users are likely to click or be redirected via links to the application's login page, such as email notifications, shared links, or redirects from other systems.

The issue manifests specifically when user-controlled data is rendered in HTML attributes without proper escaping in a browser-executed context.

Exploit preconditions

  • Attack surface: Public or internal ChurchCRM login endpoint accessible via a web browser.
  • Required access: Ability to craft and distribute a specially formed URL containing a malicious username parameter (no authentication required).
  • Trigger point: A victim opens the crafted URL and the login page reflects the username value into the input field, causing the browser to interpret the injected payload as script.
  • Why exploitation is possible: The application directly interpolates untrusted data into an HTML attribute without proper escaping or context-aware encoding, allowing script-breaking characters to alter the DOM and inject executable JavaScript.

Why this happens

This vulnerability stems from improper neutralization of input before it is included in a web page, aligning with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

The ChurchCRM login template takes the username parameter from the URL query string and outputs it into the value of an input element without applying HTML attribute encoding or validating allowable characters.

Because the browser interprets the resulting markup, attackers can inject characters that terminate the intended attribute and introduce arbitrary script, demonstrating a classic reflected XSS pattern where the response directly mirrors attacker-controlled input.

Potential impact

  • Attackers can execute arbitrary JavaScript in the victim's browser within the ChurchCRM origin.
  • Session cookies or other authentication tokens stored for the ChurchCRM domain may be accessed and exfiltrated.
  • Sensitive data displayed or accessible within the authenticated ChurchCRM interface can be read via follow-on actions if the victim is already logged in.
  • The login page's content can be modified to display a fake login form, enabling credential harvesting and phishing.
  • Users may be redirected to attacker-controlled sites from within the compromised page.

General mitigation guidance

Effective mitigation focuses on strict output encoding and minimizing trust in URL parameters:

  • Apply context-aware output encoding for any user-controlled data rendered in HTML, specifically HTML attribute encoding for values placed inside value="" attributes.
  • Treat URL parameters, including username, as untrusted input and validate them against a strict allowlist (e.g., expected username character sets and length).
  • Use templating frameworks or helper methods that default to safe escaping and discourage manual concatenation of user input into HTML.
  • Avoid reflecting raw query parameters directly; instead, store required values server-side or in short-lived, validated tokens.
  • Enforce security headers such as Content Security Policy (CSP) to reduce the impact of any remaining injection vectors where feasible.

How teams detect issues like this

Organizations can identify similar XSS issues through:

  • Static analysis rules that flag direct inclusion of request parameters in HTML templates without encoding or use of unsafe rendering APIs.
  • Manual code review focused on authentication and login views, checking for any reflected query parameters in HTML, JavaScript, or attributes.
  • Automated dynamic application security testing (DAST) or fuzzing that injects common XSS payload markers into query parameters and observes reflected responses.
  • Logging and monitoring for anomalous query strings containing script-like patterns or suspicious characters in parameters such as username.

Sources

SourceLink
github.comgithub.com/ChurchCRM/CRM/security/advisories/GHSA-rx8c-j7x8-w3hj

Frequently asked

questions

Yes. An attacker can exploit it remotely by sending crafted login URLs (for example, via email or messaging) and convincing users to click them, without needing direct access to the server.

No authentication is required to trigger the vulnerability. However, the impact is greater if the victim is already authenticated or logs in after following the malicious link.

The safest pattern is to apply strict, context-aware output encoding for any user-controlled data rendered into HTML and to validate query parameters. Use framework-provided escaping helpers and avoid directly embedding raw request parameters into templates.

Adopt a secure-by-default templating approach with automatic escaping, enforce input validation on all externally supplied data, include XSS checks in code review and CI pipelines, and consider adding a Content Security Policy to limit the impact of any remaining injection vectors.

Find out what's already
exploitable in your codebase.