{"id":"CVE-2024-1874","aliases":["ALPINE-CVE-2024-1874","AZL-40052","BELL-CVE-2024-1874","BIT-libphp-2024-1874","BIT-php-2024-1874","BIT-php-min-2024-1874","EUVD-2024-17599","GHSA-pc52-254m-w9w7","MGASA-2024-0132","openSUSE-SU-2024:13867-1"],"status":"published","title":"Command injection via array-ish $command parameter of proc_open()","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.","severity":{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.32799,"percentile":0.98361,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-116"],"published":"2024-04-12T14:57:02.466586Z","modified":"2026-11-05T05:40:51Z","exploits":[{"source":"pocgithub","id":"MrBongoC/CVE-2024-1874","title":"MrBongoC/CVE-2024-1874","date":"2024-07-18","url":"https://github.com/MrBongoC/CVE-2024-1874"}],"fixes":[{"ecosystem":"Alpine:v3.19","package":"php81","fixed_in":["8.1.28-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"php82","fixed_in":["8.2.18-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"php82","fixed_in":["8.2.18-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"php82","fixed_in":["8.2.18-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"php82","fixed_in":["8.2.18-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"php83","fixed_in":["8.3.6-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"php83","fixed_in":["8.3.5-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"php83","fixed_in":["8.3.5-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"php83","fixed_in":["8.3.5-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"php83","fixed_in":["8.3.5-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"php83","fixed_in":["8.3.5-r0"],"sources":["osv"]},{"ecosystem":"Azure Linux:3","package":"php","fixed_in":["8.3.8-1"],"sources":["osv"]},{"ecosystem":"Alpaquita:23","package":"php81","fixed_in":["8.1.28-r0"],"sources":["osv"]},{"ecosystem":"Alpaquita:stream","package":"php83","fixed_in":["8.3.6-r0"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"libphp","fixed_in":["8.1.28","8.2.18","8.3.5"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"php","fixed_in":["8.1.28","8.2.18","8.3.5"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"php-min","fixed_in":["8.1.28","8.2.18","8.3.5"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Alpine:v3.19","package":"php81","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.1.28-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"php82","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.18-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"php82","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.18-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"php82","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.18-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"php82","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.18-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.6-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.5-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.5-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.5-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.5-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.5-r0"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"php","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.8-1"}]}]},{"source":"osv","ecosystem":"Alpaquita:23","package":"php81","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.1.19-r0"},{"fixed":"8.1.28-r0"}]}]},{"source":"osv","ecosystem":"Alpaquita:stream","package":"php83","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.3.4-r2"},{"fixed":"8.3.6-r0"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"libphp","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"8.1.28"},{"introduced":"8.2.0"},{"fixed":"8.2.18"},{"introduced":"8.3.0"},{"fixed":"8.3.5"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"php","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"8.1.28"},{"introduced":"8.2.0"},{"fixed":"8.2.18"},{"introduced":"8.3.0"},{"fixed":"8.3.5"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"php-min","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"8.1.28"},{"introduced":"8.2.0"},{"fixed":"8.2.18"},{"introduced":"8.3.0"},{"fixed":"8.3.5"}]}]},{"source":"osv","ecosystem":"Mageia:9","package":"php","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.18-1.mga9"}]}],"bundled":3},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"php8","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.3.6-1.1"}]}],"bundled":4}],"products":[{"vendor":"fedoraproject","product":"fedora"},{"vendor":"php","product":"php"},{"vendor":"php group","product":"php"},{"vendor":"php_group","product":"php"}],"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7","tags":["x_transferred","Exploit","Vendor Advisory","advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/04/12/11","tags":["x_transferred","Mailing List","discussion","web"]},{"url":"https://security.netapp.com/advisory/ntap-20240510-0009/","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/07/1","tags":["x_transferred","Mailing List","discussion","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/","tags":["x_transferred","Mailing List","discussion","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/","tags":["x_transferred","Mailing List","discussion","web"]},{"url":"https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585","tags":["Exploit","Third Party Advisory","advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/","tags":["web"]},{"url":"https://www.kb.cert.org/vuls/id/123335","tags":["web"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2024-1874","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1874","tags":["web","advisory"]},{"url":"https://docs.bell-sw.com/security/cves/CVE-2024-1874","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1874.json","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2024-0132.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=33093","tags":["report"]},{"url":"https://www.php.net/ChangeLog-8.php#8.2.18","tags":["web"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2022-31629","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-1874","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-2757","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-3096","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2024-1874","title":"Command injection via array-ish $command parameter of proc_open()","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.","status":"published","published":"2024-04-29T03:57:35.624Z","modified":"2025-11-04T18:22:36.621Z","cvss":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical","assessor":"cna"}],"cwes":["CWE-116"],"updated_at":"2026-11-02T14:34:18.597034Z"}],"euvd":[{"id":"EUVD-2024-17599","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.","status":"published","published":"2024-04-29T03:57:35Z","modified":"2025-11-04T18:22:36Z","cvss":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical"}],"updated_at":"2026-11-02T19:49:23.723839Z"}],"nvd":[{"id":"CVE-2024-1874","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.","status":"published","published":"2024-04-29T04:15:07.58Z","modified":"2026-06-17T07:05:11.613Z","cvss":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical","assessor":"secondary"}],"cwes":["CWE-116"],"updated_at":"2026-11-02T14:09:55.124919Z"}],"osv":[{"id":"ALPINE-CVE-2024-1874","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.","status":"published","published":"2024-04-29T04:15:07.58Z","modified":"2026-11-03T06:32:49.3876481Z","cvss":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical"}],"updated_at":"2026-11-03T07:16:46.202932Z"},{"id":"BELL-CVE-2024-1874","status":"published","published":"2024-04-12T14:57:02.466586Z","modified":"2026-01-26T09:42:49.791102Z","cvss":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical"}],"updated_at":"2026-11-02T15:28:19.288949Z"},{"id":"CVE-2024-1874","title":"Command injection via array-ish $command parameter of proc_open()","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.","status":"published","published":"2024-04-29T03:57:35.624Z","modified":"2026-10-28T02:31:10.565069585Z","cvss":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","level":"critical"}],"cwes":["CWE-116"],"updated_at":"2026-11-02T15:44:37.917085Z"},{"id":"AZL-40052","title":"CVE-2024-1874 affecting package php for versions less than 8.3.8-1","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.","status":"published","published":"2024-04-29T04:15:07Z","modified":"2026-11-05T05:40:51Z","updated_at":"2026-11-05T16:41:19.751978Z"},{"id":"BIT-libphp-2024-1874","title":"Command injection via array-ish $command parameter of proc_open()","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.","status":"published","published":"2025-08-11T13:54:08.513Z","modified":"2026-09-08T08:48:08.398312342Z","updated_at":"2026-11-02T15:28:32.162822Z"},{"id":"BIT-php-2024-1874","title":"Command injection via array-ish $command parameter of proc_open()","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.","status":"published","published":"2024-05-14T07:29:52.385Z","modified":"2026-09-08T08:48:18.392134821Z","updated_at":"2026-11-02T15:28:34.343258Z"},{"id":"BIT-php-min-2024-1874","title":"Command injection via array-ish $command parameter of proc_open()","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.","status":"published","published":"2025-01-14T19:20:06.807Z","modified":"2026-09-08T08:48:17.918382674Z","updated_at":"2026-11-02T15:28:34.343258Z"},{"id":"MGASA-2024-0132","title":"Updated php packages fix security vulnerabilities","description":"Core:\n- Corrupted memory in destructor with weak references\n- GC does not scale well with a lot of objects created in destructor\nDOM:\n- Add some missing ZPP checks.\n- Fix potential memory leak in XPath evaluation results.\nFPM:\n- Fix incorrect check in fpm_shm_free().\nGettext:\n- Fixed sigabrt raised with dcgettext/dcngettext calls with gettext\n0.22.5 with category set to LC_ALL.\nMySQLnd:\n- Fixed handshake response [mysqlnd]\n- Fix incorrect charset length in check_mb_eucjpms().\nOpcache:\n- JITed QM_ASSIGN may be optimized out when op1 is null\n- Segmentation fault for enabled observers when calling trait method of\ninternal trait when opcache is loaded\nPDO:\n- Fix various PDORow bugs.\nRandom:\n- Pre-PHP 8.2 compatibility for mt_srand with unknown modes\n- Global Mt19937 is not properly reset in-between requests when\nMT_RAND_PHP is used\nSession:\n- Segfault with session_decode and compilation error\nSockets:\n- socket_getsockname returns random characters in the end of the socket\nname\nSPL:\n- Unable to resize SplfixedArray after being unserialized in PHP 8.2.15\n- Unexpected null pointer in zend_string.h\nStandard:\n- Added validation of `\\n` in $additional_headers of mail()\n- Command injection via array-ish $command parameter of proc_open).\n(CVE-2024-1874)\nFixed bug GHSA-wpj3-hf5j-x4v4 (__Host-/__Secure- cookie bypass due to\npartial CVE-2022-31629 fix). (CVE-2024-2756)\n- password_verify can erroneously return true, opening ATO risk.\n(CVE-2024-3096)\n","status":"published","published":"2024-04-13T16:56:38Z","modified":"2026-04-16T04:43:28.435357797Z","updated_at":"2026-11-02T15:49:42.684501Z"},{"id":"openSUSE-SU-2024:13867-1","title":"php8-8.3.6-1.1 on GA media","description":"These are all security issues fixed in the php8-8.3.6-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T02:49:09.531279Z","updated_at":"2026-11-02T16:58:36.662953Z"}]}}
