# CVE-2024-5585: Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)

- Severity: High 7.7 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 28.8%, higher than 98% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-09T18:36:50.477Z
- Modified: 2026-09-08T08:48:18.224Z
- Also known as: BIT-LIBPHP-2024-5585, BIT-PHP-2024-5585, BIT-PHP-MIN-2024-5585, GHSA-9fcc-425m-g385
- Weaknesses: CWE-78, CWE-116
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: php

## Description

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.

(As written by CVE List.)

## Affected

- PHP Group PHP: from 8.1.* before 8.1.29; from 8.2.* before 8.2.20; from 8.3.* before 8.3.8
- php php: from 8.1.0 before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8
- fedoraproject fedora: 40
- libphp (Bitnami): before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8
- php (Bitnami): before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8
- php-min (Bitnami): before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8

## Every score

- php: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385> (exploit, advisory, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/06/07/1> (advisory, mailing-list, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/> (advisory, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/> (web)
- <https://security.netapp.com/advisory/ntap-20240726-0002/> (web)
- <https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5585> (web)

## Sources

- CVE List: [CVE-2024-5585](https://www.cve.org/CVERecord?id=CVE-2024-5585), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2024-5585](https://nvd.nist.gov/vuln/detail/CVE-2024-5585), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2024-5585](https://osv.dev/vulnerability/BIT-LIBPHP-2024-5585), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2024-5585](https://osv.dev/vulnerability/BIT-PHP-2024-5585), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2024-5585](https://osv.dev/vulnerability/BIT-PHP-MIN-2024-5585), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2024-5585 · Whole record: https://cve.day/CVE-2024-5585.json · Rebuilt by cve.day 2026-11-25T22:58:41.604Z
