critical CVSS 9.8 Actively exploited

CVE-2024-56145·PHP vulnerability

Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified remote code execution vector is present. Users are advised to update to version 3.9.14, 4.13.2, or 5.5.2. Users unable to upgrade should disable `register_argc_argv` to mitigate the issue.

Severity
critical
Software
PHP
Fixed in
5.5.2
Published
2024-12-18

Affected versions

From: 5.0.0

Until: 5.5.2

Fixed in: 5.5.2

How to fix this CVE

Upgrade PHP to version 5.5.2 or later to patch the remote code execution vulnerability triggered through the `register_argc_argv` PHP directive. If immediate patching is not possible, disable `register_argc_argv` in your php.ini configuration file as an interim mitigation. This vulnerability is actively exploited in the wild and requires urgent attention.

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

POST|GET requests containing encoded or plaintext ARGV injection patterns in query strings or request bodies (e.g., `$_SERVER['argv']`, `argc=`, `argv=`); payloads attempting to set PHP variables via HTTP parameters when register_argc_argv is enabled

WAF mitigation (if patching is not yet possible)

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

Implement WAF rules to block HTTP requests containing suspicious `argv` or `argc` parameters in the query string or POST body. Additionally, block requests with PHP variable assignment syntax in user-controlled input (e.g., patterns matching `\$[a-zA-Z_][a-zA-Z0-9_]*\s*=`).

How to check if you are affected

  1. Check installed PHP version: php -v
  2. Verify if register_argc_argv is enabled: php -r 'echo ini_get("register_argc_argv") ? "ENABLED - VULNERABLE" : "DISABLED - SAFE";'
  3. Search web server access logs for suspicious argument injection patterns: grep -i 'argc\|argv' /var/log/apache2/access.log /var/log/nginx/access.log
  4. Confirm patch installation: php -v should show version 5.5.2 or higher, and re-run the register_argc_argv check to ensure it remains disabled

FAQ

What is CVE-2024-56145?

CVE-2024-56145 is a critical remote code execution vulnerability in PHP that exploits the `register_argc_argv` configuration directive, allowing attackers to inject and execute arbitrary code on affected servers without authentication.

Is CVE-2024-56145 being actively exploited?

Yes, this vulnerability is actively exploited in the wild and is tracked by CISA in their Known Exploited Vulnerabilities catalog. Threat actors are actively weaponizing this flaw against production systems.

What versions of PHP are affected by CVE-2024-56145?

PHP versions 5.0.0 through 5.5.1 are vulnerable. Version 5.5.2 and later include the security patch. Earlier versions (3.9.14, 4.13.2) also have fixes available.

How do I check if my server is vulnerable to CVE-2024-56145?

Run: php -v to confirm version is below 5.5.2, then run: php -r 'echo ini_get("register_argc_argv") ? "VULNERABLE" : "PROTECTED";' If both conditions are true, your server is exploitable.

Does Defensia detect CVE-2024-56145?

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

Related PHP CVEs

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-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-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-62521CVSS 10ChurchCRM 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.
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.

References

Track CVEs across your fleet automatically

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

Get started free