OS Command Injection in PHP - CVE-2024-4577

 

OS Command Injection in PHP - CVE-2024-4577

Published: June 4, 2024 / Updated: March 18, 2025


Vulnerability identifier: #VU91106
CSH Severity: Critical
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:A/U:Red
CVE-ID: CVE-2024-4577
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: The vulnerability is being exploited in the wild
Vendor: PHP Group
Affected software:
PHP

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.

The vulnerability exists due to improper input validation in PHP-CGI implementation. A remote attacker can send specially crafted HTTP request to the application and execute arbitrary OS commands on the system.

Note, the vulnerability exists due to incomplete fix for #VU4201 (CVE-2012-1823).

How to mitigate CVE-2024-4577

Install updates from vendor's website.

Sources