CVE-2024-1874 in the critical feed json
Command injection via array-ish $command parameter of proc_open()
published 2024-04-11 2 y ago modified 2026-09-08 2 mo ago also BIT-libphp-2024-1874 , BIT-php-2024-1874 , BIT-php-min-2024-1874 , EUVD-2024-17599 , GHSA-pc52-254m-w9w7
- cvss
- 9.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 32.8%
- EPSS 32.8% chance of exploitation in 30 days, percentile 98%
- public exploits
- 0
- none known
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.
Patch / fix
- bitnami libphp 8.1.28, 8.2.18, 8.3.5
- bitnami php 8.1.28, 8.2.18, 8.3.5
- bitnami php-min 8.1.28, 8.2.18, 8.3.5
- PHP Group PHP 8.1.28, 8.2.18, 8.3.5
- php8 openSUSE Tumbleweed 8.3.6-1.1
opensuse advisories openSUSE-SU-2024:13867-1
- php81 Alpine 3.19 8.1.28-r0
- php82 Alpine 3.22, Alpine 3.21, Alpine 3.20 +1 more 8.2.18-r0
- php83 Alpine 3.19 8.3.6-r0
- php83 Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 8.3.5-r0
alpine advisories ALPINE-CVE-2024-1874
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-1874 updated
php: Fail to Escape Arguments Properly in Microsoft Windows
-
Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more Red Hat Enterprise Linux 7 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +18 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 php, libzip, php-gd, php-cli, php-dba, php-dbg, +30 more Red Hat Enterprise Linux 9 php, php-gd, php-cli, php-dba, php-dbg, php-ffi, +18 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
32.80% chance of exploitation in the next 30 days, higher than 98% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7 referenced PoC, tagged "exploit" by a source, unverified
- vicarius.io https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| OSV | 3.1 | 9.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libphp | <8.1.28 >=8.2.0, <8.2.18 >=8.3.0, <8.3.5 |
8.1.28 8.2.18 8.3.5 |
| bitnami | php | <8.1.28 >=8.2.0, <8.2.18 >=8.3.0, <8.3.5 |
8.1.28 8.2.18 8.3.5 |
| bitnami | php-min | <8.1.28 >=8.2.0, <8.2.18 >=8.3.0, <8.3.5 |
8.1.28 8.2.18 8.3.5 |
Affected products
- PHP Group PHP
- php_group php
Classification
- Weakness
-
- CWE-116 Improper Encoding or Escaping of Output
- Technology feeds
References
-
github.com
/php/php-src/security/advisories/GHSA-pc52-254m-w9w7
exploit, vendor-advisory, advisory
-
vicarius.io
/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585
exploit, third-party-advisory, advisory
-
openwall.com
/lists/oss-security/2024/04/12/11
mailing-list, discussion
-
security.netapp.com
/advisory/ntap-20240510-0009/
third-party-advisory, advisory
-
openwall.com
/lists/oss-security/2024/06/07/1
mailing-list, discussion
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
mailing-list, discussion
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
mailing-list, discussion
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/
web
-
kb.cert.org
/vuls/id/123335
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-1874
web
Sources
- CVE List CVE-2024-1874
- NVD CVE-2024-1874
- OSV BIT-libphp-2024-1874
- OSV BIT-php-2024-1874
- OSV BIT-php-min-2024-1874
- Maintainer advisory GHSA-pc52-254m-w9w7
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of php/php-src published their own advisory on GitHub. Reviewed sources take precedence over it.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.