critical CVSS 10

CVE-2025-62521·PHP vulnerability

ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.

Severity
critical
Software
PHP
Fixed in
5.21.0
Published
2025-12-17

Affected versions

Until: 5.21.0

Fixed in: 5.21.0

How to fix this CVE

Upgrade ChurchCRM to version 5.21.0 or later immediately, as this critical vulnerability allows unauthenticated attackers to execute arbitrary PHP code during the setup wizard. If your installation is still in the setup phase, complete the installation with version 5.21.0 or later to prevent compromise. If you are running a vulnerable version in production, audit your Include/Config.php file for suspicious PHP code and review setup logs for evidence of exploitation before updating.

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

POST /setup/routes/setup.php with form parameters containing PHP control characters (<?php, eval(), system(), exec()) or suspicious variable assignments in HTTP request bodies; also look for HTTP 200 responses from /setup/ endpoint followed by writes to Include/Config.php containing unexplained PHP functions

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Block all HTTP requests to /setup/ path if the installation is complete; implement input validation rules that reject form submissions containing PHP tags (<?php, ?>, eval, system, exec) to the setup endpoint; rate-limit POST requests to setup routes to slow reconnaissance attempts

How to check if you are affected

  1. Check your ChurchCRM version: grep -i 'version' path/to/churchcrm/version.txt or check the admin panel under Settings → System Information
  2. Verify if the setup wizard is still accessible: curl -s http://your-domain/setup/ | grep -i 'setup\|install' to confirm if setup.php is reachable
  3. Examine Include/Config.php for suspicious PHP code: cat Include/Config.php | grep -E '(eval|system|exec|passthru|shell_exec|proc_open)' to detect injected code
  4. Confirm the patch by verifying the ChurchCRM version is 5.21.0 or higher: grep -r 'VERSION' path/to/churchcrm/ or check the release tag in git

FAQ

What is CVE-2025-62521?

CVE-2025-62521 is a critical pre-authentication remote code execution vulnerability in ChurchCRM that allows attackers to inject malicious PHP code through the setup wizard without requiring login credentials. The injected code is written directly to the configuration file and executed on every page load, leading to complete server compromise.

Is CVE-2025-62521 being actively exploited?

No, there are currently no reports of active exploitation in the wild, and no public exploits are available. However, the ease of exploitation and critical severity mean you should patch immediately to prevent opportunistic attacks.

What versions of ChurchCRM are affected by CVE-2025-62521?

All versions of ChurchCRM prior to 5.21.0 are vulnerable. Version 5.21.0 and later contain the necessary input validation and sanitization fixes.

How do I check if my server is vulnerable to CVE-2025-62521?

Run: curl -s http://your-domain/setup/ | grep -i 'setup' to see if the setup wizard is accessible, and verify your ChurchCRM version is below 5.21.0. If the setup wizard is reachable and you're on a vulnerable version, your server is at immediate risk.

Does Defensia detect CVE-2025-62521?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If ChurchCRM or PHP is installed on a monitored server, CVE-2025-62521 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2024-5932CVSS 10The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 3.14.1 via deserialization of untrusted input from the 'give_title' parameter. This makes it possible for unauthenticated attackers to inject a PHP Object. The additional presence of a POP chain allows attackers to execute code remotely, and to delete arbitrary files.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2026-39337CVSS 10ChurchCRM is an open-source church management system. Prior to 7.1.0, critical pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The "$dbPassword" variable is not sanitized. This vulnerability exists due to an incomplete fix for CVE-2025-62521. This vulnerability is fixed in 7.1.0.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-62521. Free for 1 server.

Get started free