RCE in PHP
CVE-2024-5585
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, the fix for CVE-2024-1874 does not work if the command name includes trailing spaces. Original issue: when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.
Vulnerability class: Command Injection (OS Command Injection)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.7 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L.
EPSS exploit prediction
EPSS 0.288, 98.2th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- PHP
- PHP Group — versions 8.1.*, 8.2.*, 8.3.*
- Fedoraproject Fedora — versions 40
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 2 other repositories (ildefonso0/php-7.2.34-CVE-2024, tianstcht/tianstcht). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385 (Exploit, Third Party Advisory)
- www.openwall.com/lists/oss-security/2024/06/07/1 (Mailing List, Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/…
- security.netapp.com/advisory/ntap-20240726-0002/
- www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-window…