Command injection via array-ish $command parameter of proc_open()
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · Low
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.
Summary
In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, 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
- Yes
- 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.28; before 8.2.18; before 8.3.5 | 8.1.28, 8.2.18, 8.3.5 | Patch available | CNA |
- PHP VendorPHP Group Affected before 8.1.28; before 8.2.18; before 8.3.5 Fixed in 8.1.28, 8.2.18, 8.3.5 Patch available CNA
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:php:php:*:*:*:*:*:*:*:* | 8.1.0 to before 8.1.28; 8.2.0 to before 8.2.18; 8.3.0 to before 8.3.5 | Vulnerable | PHP |
| cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* | 39 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* | 40 | Vulnerable | Fedoraproject |
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:* Versions 8.1.0 to before 8.1.28; 8.2.0 to before 8.2.18; 8.3.0 to before 8.3.5 Vulnerable ·PHP
- cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* Versions 39 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* Versions 40 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA PHP (PHP Group) Fixed in 8.1.28, 8.2.18, 8.3.5
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
PHP 8.1.28, 8.2.18, 8.3.5
3 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2024-02567 __Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fixPriority MEDIUM 62
- TI-2024-02900 PHP function password_verify can erroneously return true when argument contains NULPriority LOW 34
Vendor assessments
Red Hat
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
Not affected: 2 products
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2024-1874
References
Exploit 2
Other 4
- http://www.openwall.com/lists/oss-security/2024/04/12/11
- http://www.openwall.com/lists/oss-security/2024/06/07/1
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
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-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
- TI-2024-05189 Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix) CVSS 3.1HIGH 8.8
Sources
- CVE-2024-1874 · CVE Program
- CVE-2024-1874 · NVD
- FIRST EPSS
- CVE-2024-1874 · 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