CVE-2024-1874 | Command injection via array-ish $command parameter of proc_open()

Exp

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.

Published: 2024-04-29 Last update: 2025-11-04 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-1874 is rated High Exploit Risk (92.1/100): CVSS Critical severity, with high exploitation likelihood (EPSS 68.57%, 99th percentile). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +5.20% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2024-1874

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2024-1874

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-18 63.38% 68.57% +5.20%
2 2026-02-13 57.55% 63.38% +5.83%
3 2025-12-31 57.55%

Full EPSS history (26 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-1874

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.4 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 5.5 [email protected]

Weakness enumeration for CVE-2024-1874

OS Trackers for CVE-2024-1874

vendor priority summary link
alpine critical CVE-2024-1874: 3 source package rows (php81, php82, php83); 12 state rows across 5 repos (3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 12, open 0. https://security.alpinelinux.org/vuln/CVE-2024-1874
debian unimportant CVE-2024-1874 unimportant priority: Debian including 2 source packages (php7.4, php8.2), 2 status rows across 2 suites (bookworm, bullseye): resolved 2. https://security-tracker.debian.org/tracker/CVE-2024-1874
redhat https://access.redhat.com/security/cve/CVE-2024-1874
ubuntu medium CVE-2024-1874 medium priority: Ubuntu including 7 source packages (php5, php7.0, …), 44 status rows across 8 suites (bionic, focal, jammy, mantic, noble, trusty, upstream, xenial): DNE 30, not-affected 7, needs-triage 4, released 3. https://ubuntu.com/security/CVE-2024-1874

Affected software / configurations for CVE-2024-1874

Vendor Product Version Raw CPE
php php >= 8.1.0, < 8.1.28 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.2.0, < 8.2.18 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.3.0, < 8.3.5 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
fedoraproject fedora 39 cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
fedoraproject fedora 40 cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*

References for CVE-2024-1874

URL Tags
http://www.openwall.com/lists/oss-security/2024/04/12/11 Mailing List
http://www.openwall.com/lists/oss-security/2024/06/07/1 Mailing List
https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7 Exploit Vendor Advisory
https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ Mailing List
https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ Mailing List
https://security.netapp.com/advisory/ntap-20240510-0009/ Third Party Advisory
https://lists.fedoraproject.org/archives/list/[email protected]/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/
https://lists.fedoraproject.org/archives/list/[email protected]/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/
https://www.kb.cert.org/vuls/id/123335
https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585 Exploit Third Party Advisory
cvelogic Threat Intelligence