{"id":"CVE-2024-1874","published":"2024-04-29T03:57:35Z","modified":"2025-11-04T18:22:36Z","title":"Command injection via array-ish $command parameter of proc_open()","vendor":"PHP","product":"PHP","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.32799,"percentile":0.98389,"provenance":"source"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2024/04/12/11","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20240510-0009/","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/07/1","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/","tags":[]},{"url":"https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/","tags":[]},{"url":"https://www.kb.cert.org/vuls/id/123335","tags":[]}],"priority":{"score":31.3,"factors":[{"name":"EPSS percentile","points":19.68},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.58}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2024-07-18","earliestUrl":"https://github.com/MrBongoC/CVE-2024-1874","repos":[{"name":"MrBongoC/CVE-2024-1874","url":"https://github.com/MrBongoC/CVE-2024-1874","stars":2,"created":"2024-07-18"}]},"first":{"date":"2024-07-18","source":"PoC-in-GitHub","url":"https://github.com/MrBongoC/CVE-2024-1874"},"provenance":"source"},"vendorSlug":"php","affectedVersions":[{"vendor":"PHP Group","product":"PHP","versions":[">= 8.1.*, < 8.1.28",">= 8.2.*, < 8.2.18",">= 8.3.*, < 8.3.5"]}],"workarounds":{"items":["Using proc_open() string syntax avoids the problem."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2024-04-29T13:05:18.510843Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"The flaw is a command injection in PHP's proc_open() function, where insufficient escaping of arguments passed as an array to the $command parameter affects PHP 8.1 before 8.1.28, 8.2 before 8.2.18, and 8.3 before 8.3.5 on Windows. An attacker who can control the arguments of the executed command can supply input that runs arbitrary commands in the Windows shell, provided the application uses the array syntax of proc_open() with attacker-influenced arguments and the attacker can reach that code path over the network without authentication or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:31:05Z"},"euvd":{"id":"EUVD-2024-17599","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-php-cve-2024-1874","children":[{"from":"CVE-2024-1874","to":"CVE-2024-5585","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"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.","from":"CVE.org","in":"CVE-2024-5585"},{"kind":"similar","provenance":"machine","score":0.85,"basis":"same product + CWE + description similarity"}]}]}}