CVE-2024-5585 in the critical feed json
Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)
published 2024-06-09 2 y ago modified 2026-09-08 2 mo ago also BIT-libphp-2024-5585 , BIT-php-2024-5585 , BIT-php-min-2024-5585 , EUVD-2024-46774 , GHSA-9fcc-425m-g385
- cvss
- 7.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 28.8%
- EPSS 28.8% chance of exploitation in 30 days, percentile 98%
- public exploits
- 0
- none known
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.
Patch / fix
- bitnami libphp 8.1.29, 8.2.20, 8.3.8
- bitnami php 8.1.29, 8.2.20, 8.3.8
- bitnami php-min 8.1.29, 8.2.20, 8.3.8
- PHP Group PHP 8.1.29, 8.2.20, 8.3.8
- php php 8.1.29, 8.2.20, 8.3.8
- php81 Alpine 3.19 8.1.29-r0
- php82 Alpine 3.19 8.2.20-r0
- php83 Alpine 3.19 8.3.8-r0
alpine advisories ALPINE-CVE-2024-5585
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- php CBL-Mariner 2.0 8.1.29-1
- php Azure Linux 3.0 8.3.8-1
azure linux advisories AZL-42427AZL-42439
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
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-5585 updated cvss 8.8
php: Arguments execute arbitrary commands in Windows shell
-
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 more 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 more Red Hat Enterprise Linux 10 phpnot 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
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
28.81% 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-9fcc-425m-g385 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libphp | <8.1.29 >=8.2.0, <8.2.20 >=8.3.0, <8.3.8 |
8.1.29 8.2.20 8.3.8 |
| bitnami | php | <8.1.29 >=8.2.0, <8.2.20 >=8.3.0, <8.3.8 |
8.1.29 8.2.20 8.3.8 |
| bitnami | php-min | <8.1.29 >=8.2.0, <8.2.20 >=8.3.0, <8.3.8 |
8.1.29 8.2.20 8.3.8 |
Affected products
- PHP Group PHP
- php php
Classification
- Weakness
- Technology feeds
References
-
github.com
/php/php-src/security/advisories/GHSA-9fcc-425m-g385
exploit, third-party-advisory, advisory
-
openwall.com
/lists/oss-security/2024/06/07/1
mailing-list, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
web
-
security.netapp.com
/advisory/ntap-20240726-0002/
web
-
vicarius.io
/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-5585
web
Sources
- CVE List CVE-2024-5585
- NVD CVE-2024-5585
- OSV BIT-libphp-2024-5585
- OSV BIT-php-2024-5585
- OSV BIT-php-min-2024-5585
- Maintainer advisory GHSA-9fcc-425m-g385
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.