Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA. Impact type from CWE-78.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PHP Group | PHP | before 8.1.29; before 8.2.20; before 8.3.8 | 8.1.29, 8.2.20, 8.3.8 | Patch available | CNA |
- PHP VendorPHP Group Affected before 8.1.29; before 8.2.20; before 8.3.8 Fixed in 8.1.29, 8.2.20, 8.3.8 Patch available CNA
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:php:php:*:*:*:*:*:*:*:* | 8.1.0 to before 8.1.29; 8.2.0 to before 8.2.20; 8.3.0 to before 8.3.8 | Vulnerable | PHP |
| cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* | 40 | Vulnerable | Fedoraproject |
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:* Versions 8.1.0 to before 8.1.29; 8.2.0 to before 8.2.20; 8.3.0 to before 8.3.8 Vulnerable ·PHP
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* Versions 40 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA PHP (PHP Group) Fixed in 8.1.29, 8.2.20, 8.3.8
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
PHP 8.1.29, 8.2.20, 8.3.8
4 records Highest priority Priority CRITICAL 1 CRITICAL, 1 HIGH, 2 MEDIUM
Other records, highest priority first
- TI-2024-04260 Argument Injection in PHP-CGIPriority CRITICAL 100
- TI-2024-05072 Filter bypass in filter_var (FILTER_VALIDATE_URL)Priority MEDIUM 63
- TI-2024-02236 PHP is vulnerable to the Marvin AttackPriority MEDIUM 60
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 5 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2024-5585
References
Advisory 2
More PHP Group vulnerabilities
- TI-2024-04260 Argument Injection in PHP-CGI KEVCVSS 3.1CRITICAL 9.8
- TI-2026-78794 PHP remote code execution via stale global state KEVCVSS 4.0CRITICAL 9.2
- TI-2026-78793 Out-of-memory handling flaw in PHP allows remote code execution KEVCVSS 4.0CRITICAL 9.2
- TI-2024-01743 Command injection via array-ish $command parameter of proc_open() CVSS 3.1CRITICAL 9.4
- TI-2022-13555 PDO::quote() may return unquoted string CVSS 3.1CRITICAL 9.1
- TI-2024-10408 Reference counting in php_request_shutdown causes Use-After-Free CVSS 4.0CRITICAL 9.2
Sources
- CVE-2024-5585 · CVE Program
- CVE-2024-5585 · NVD
- FIRST EPSS
- CVE-2024-5585 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences