/

CVE-2026-42288

Severity:

CRITICAL RISK

(10.0)

Code Injection in ChurchCRM Setup Wizard

CVE-2026-42288

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Pre-authentication Remote Code Execution

Severity:

CRITICAL RISK

(10.0)

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's setup wizard previously allowed pre-authentication code injection through the unsanitized DB_PASSWORD parameter.

If an attacker could reach the setup interface, they could supply crafted input that is embedded into server-side code or commands, leading to full remote code execution.

Affected context

The vulnerability occurs in ChurchCRM deployments where the setup wizard is exposed and processes database connection parameters provided by the user.

Specifically, the DB_PASSWORD value from the setup flow is used in a way that influences server-side code or shell execution without robust sanitization or escaping.

Installations that leave the setup interface reachable in production, or that allow untrusted users to access the installer, are at particular risk.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint for the ChurchCRM setup wizard.
  • Required access: Network access to the setup interface; no prior authentication required.
  • Trigger point: Submission of the setup form that includes a crafted DB_PASSWORD value.
  • Why exploitation is possible: The application interpolates or concatenates the supplied DB_PASSWORD into executable code or commands without sufficient neutralization, allowing attacker-controlled input to be interpreted as code.

Why this happens

This issue is a classic code injection vulnerability aligning with CWE-94: Improper Control of Generation of Code ('Code Injection').

The setup wizard treats user-controlled configuration data (DB_PASSWORD) as data but later uses it in a context where it is processed as code or command syntax.

Because the value is not strictly validated, escaped, or isolated from the execution environment, specially crafted payloads can break out of the intended data context and inject arbitrary instructions.

The incomplete fix for the earlier vulnerability left at least one code path in which DB_PASSWORD still influenced executable logic without adequate safeguards.

Potential impact

  • Attacker can execute arbitrary commands or code on the server.
  • Full compromise of the ChurchCRM application and its data.
  • Access to or modification of the underlying database contents.
  • Installation of backdoors or pivoting further into the hosting environment.
  • Long-term persistence and tampering with church member records and sensitive information.

General mitigation guidance

Effective mitigation centers on treating all configuration input as untrusted and ensuring it never directly influences executable contexts.

Recommended patterns include:

  • Avoid generating or concatenating code or shell commands from user-supplied configuration values such as DB_PASSWORD.
  • Use parameterized APIs or configuration libraries that separate data from execution and do not require string-based command construction.
  • Apply strict validation and normalization to all setup inputs, enforcing strong character and length constraints appropriate for passwords and connection strings.
  • Isolate installer logic from runtime operations, and disable or remove the setup wizard once installation is complete.
  • Run the application and its setup process with least-privilege accounts to reduce the blast radius of any unexpected execution.

How teams detect issues like this

Detection typically combines code-level analysis with deployment reviews:

  • Static analysis: Search for patterns where user-supplied configuration values (e.g., DB_PASSWORD) flow into eval-like constructs, dynamic includes, template evaluation, or shell/command execution APIs.
  • Code review: Flag any setup or installer code that builds configuration files, scripts, or commands via string concatenation or interpolation that includes untrusted input.
  • Security testing: Use dynamic application security testing (DAST) and fuzzing on the setup wizard to detect when user input alters control flow or execution behavior.
  • Policy enforcement: Enforce internal guidelines banning dynamic code generation from request parameters and requiring input validation for all installer fields; automated review tools can help enforce these policies in CI.

Sources

SourceLink
github.comgithub.com/ChurchCRM/CRM/security/advisories/GHSA-mp2w-4q3r-ppx7

Frequently asked

questions

Yes. An attacker who can reach the ChurchCRM setup wizard over the network can exploit the issue without prior authentication by supplying a malicious DB_PASSWORD.

No. The flaw is pre-authentication in the installer flow, so no ChurchCRM account or database credentials are required to trigger it.

The safest pattern is to completely decouple user input from any code or command generation. Use parameterized functions and configuration APIs, and avoid constructing executable strings from request parameters. Where dynamic behavior is unavoidable, enforce strict validation and escaping and keep such logic minimal and well-reviewed.

Design installers under the assumption that all inputs are attacker-controlled: require input validation, avoid dynamic execution based on user data, restrict exposure of the setup interface, and decommission or lock down setup endpoints after successful installation. Incorporating secure coding checklists and automated analysis for installer components helps catch such issues early.

Find out what's already
exploitable in your codebase.