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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2024-06-09 · Modified: 2025-02-13
- Aliases: CGA-jv4q-p359-w7v3, CGA-mjpm-2qjw-28v3, CGA-q9m5-f977-g33g, CGA-qgc7-7w5c-6ww6, ALPINE-CVE-2024-5585
- Record: https://cvemate.com/vulnerability/CVE-2024-5585 · JSON: https://cvemate.com/vulnerability/CVE-2024-5585/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 28.807%, percentile 98.193%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine php81 (Alpine Linux): \< 8.1.29-r0
- alpine php82 (Alpine Linux): \< 8.2.20-r0
- alpine php83 (Alpine Linux): \< 8.3.8-r0
- chainguard php-8.1 (Chainguard): \< 8.1.29-r0
- chainguard php-8.2 (Chainguard): \< 8.2.20-r0
- wolfi php-8.1 (Wolfi): \< 8.1.29-r0
- wolfi php-8.2 (Wolfi): \< 8.2.20-r0
- fedoraproject fedora: 40
- php group php: ≥ 8.1.\*, \< 8.1.29 \| ≥ 8.2.\*, \< 8.2.20 \| ≥ 8.3.\*, \< 8.3.8
- php php: ≥ 8.1.0, \< 8.1.29 \| ≥ 8.2.0, \< 8.2.20 \| ≥ 8.3.0, \< 8.3.8

## References

- <https://github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385>
- <http://www.openwall.com/lists/oss-security/2024/06/07/1>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/>
- <https://security.netapp.com/advisory/ntap-20240726-0002/>
- <https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5585.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5585>
- <https://github.com/php/php-src>
- <https://security.alpinelinux.org/vuln/CVE-2024-5585>

---

Data as of 2026-12-05T09:38:55.286Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
