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

- Severity: Critical 9.4 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:L/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): 32.8%, higher than 98% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2024-04-29T03:57:35.624Z
- Modified: 2026-09-08T08:48:18.392Z
- Also known as: BIT-LIBPHP-2024-1874, BIT-PHP-2024-1874, BIT-PHP-MIN-2024-1874, GHSA-pc52-254m-w9w7
- Weaknesses: CWE-116
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: php

## Description

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.

(As written by CVE List.)

## Affected

- PHP Group PHP: from 8.1.* before 8.1.28; from 8.2.* before 8.2.18; from 8.3.* before 8.3.5
- php_group php: 8.1.0; 8.2.0; 8.3.0
- php php: from 8.1.0 before 8.1.28; from 8.2.0 before 8.2.18; from 8.3.0 before 8.3.5
- fedoraproject fedora: 39; 40
- libphp (Bitnami): before 8.1.28; from 8.2.0 before 8.2.18; from 8.3.0 before 8.3.5
- php (Bitnami): before 8.1.28; from 8.2.0 before 8.2.18; from 8.3.0 before 8.3.5
- php-min (Bitnami): before 8.1.28; from 8.2.0 before 8.2.18; from 8.3.0 before 8.3.5

## Every score

- php: CVSS:3.1 9.4 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7> (exploit, advisory, vendor-advisory)
- <https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585> (exploit, advisory, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/04/12/11> (discussion, mailing-list)
- <https://security.netapp.com/advisory/ntap-20240510-0009/> (advisory, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/06/07/1> (discussion, mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/> (discussion, mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/> (discussion, mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/> (web)
- <https://www.kb.cert.org/vuls/id/123335> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-1874> (web)

## Sources

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

---

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