CVE-2024-1874
Command injection via array-ish $command parameter of proc_open()
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
9.4
Command injection via array-ish $command parameter of proc_open()
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.
- Record
CVE-2024-1874- 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 - Weakness
- CWE-116
- Updated
- 2026-11-02
EUVDEUVD-2024-17599
9.4
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.
- Record
EUVD-2024-17599- 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 - Updated
- 2026-11-02
NVD
9.4
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.
- Record
CVE-2024-1874- 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 - Weakness
- CWE-116
- Updated
- 2026-11-02
OSVALPINE-CVE-2024-1874
9.4
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.
- Record
ALPINE-CVE-2024-1874- 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 - Updated
- 2026-11-03
OSVBELL-CVE-2024-1874
9.4
- Record
BELL-CVE-2024-1874- 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 - Updated
- 2026-11-02
OSV
9.4
Command injection via array-ish $command parameter of proc_open()
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.
- Record
CVE-2024-1874- 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 - Weakness
- CWE-116
- Updated
- 2026-11-02
Show 6 moreShow less
OSVAZL-40052 No score
CVE-2024-1874 affecting package php for versions less than 8.3.8-1
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.
- Record
AZL-40052- Updated
- 2026-11-05
OSVBIT-libphp-2024-1874 No score
Command injection via array-ish $command parameter of proc_open()
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.
- Record
BIT-libphp-2024-1874- Updated
- 2026-11-02
OSVBIT-php-2024-1874 No score
Command injection via array-ish $command parameter of proc_open()
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.
- Record
BIT-php-2024-1874- Updated
- 2026-11-02
OSVBIT-php-min-2024-1874 No score
Command injection via array-ish $command parameter of proc_open()
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.
- Record
BIT-php-min-2024-1874- Updated
- 2026-11-02
OSVMGASA-2024-0132 No score
Updated php packages fix security vulnerabilities
Core:
- Corrupted memory in destructor with weak references
- GC does not scale well with a lot of objects created in destructor DOM:
- Add some missing ZPP checks.
- Fix potential memory leak in XPath evaluation results. FPM:
- Fix incorrect check in fpm_shm_free(). Gettext:
- Fixed sigabrt raised with dcgettext/dcngettext calls with gettext 0.22.5 with category set to LC_ALL. MySQLnd:
- Fixed handshake response [mysqlnd]
- Fix incorrect charset length in check_mb_eucjpms(). Opcache:
- JITed QM_ASSIGN may be optimized out when op1 is null
- Segmentation fault for enabled observers when calling trait method of internal trait when opcache is loaded PDO:
- Fix various PDORow bugs. Random:
- Pre-PHP 8.2 compatibility for mt_srand with unknown modes
- Global Mt19937 is not properly reset in-between requests when MT_RAND_PHP is used Session:
- Segfault with session_decode and compilation error Sockets:
- socket_getsockname returns random characters in the end of the socket name SPL:
- Unable to resize SplfixedArray after being unserialized in PHP 8.2.15
- Unexpected null pointer in zend_string.h Standard:
- Added validation of
\nin $additional_headers of mail() - Command injection via array-ish $command parameter of proc_open). (CVE-2024-1874) Fixed bug GHSA-wpj3-hf5j-x4v4 (__Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fix). (CVE-2024-2756)
- password_verify can erroneously return true, opening ATO risk. (CVE-2024-3096)
- Record
MGASA-2024-0132- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13867-1 No score
php8-8.3.6-1.1 on GA media
These are all security issues fixed in the php8-8.3.6-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13867-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
php81Alpine:v3.19 |
before 8.1.28-r0 | 8.1.28-r0 |
php82Alpine:v3.19 |
before 8.2.18-r0 | 8.2.18-r0 |
php82Alpine:v3.20 |
before 8.2.18-r0 | 8.2.18-r0 |
php82Alpine:v3.21 |
before 8.2.18-r0 | 8.2.18-r0 |
php82Alpine:v3.22 |
before 8.2.18-r0 | 8.2.18-r0 |
php83Alpine:v3.19 |
before 8.3.6-r0 | 8.3.6-r0 |
php83Alpine:v3.20 |
before 8.3.5-r0 | 8.3.5-r0 |
php83Alpine:v3.21 |
before 8.3.5-r0 | 8.3.5-r0 |
php83Alpine:v3.22 |
before 8.3.5-r0 | 8.3.5-r0 |
php83Alpine:v3.23 |
before 8.3.5-r0 | 8.3.5-r0 |
Show 9 moreShow less
| Package | Affected | Fixed |
|---|---|---|
php83Alpine:v3.24 |
before 8.3.5-r0 | 8.3.5-r0 |
phpAzure Linux:3 |
before 8.3.8-1 | 8.3.8-1 |
php81Alpaquita:23 |
8.1.19-r0 up to 8.1.28-r0 | 8.1.28-r0 |
php83Alpaquita:stream |
8.3.4-r2 up to 8.3.6-r0 | 8.3.6-r0 |
libphpBitnami |
before 8.1.28, 8.2.0 up to 8.2.18, 8.3.0 up to 8.3.5 | 8.1.288.2.188.3.5 |
phpBitnami |
before 8.1.28, 8.2.0 up to 8.2.18, 8.3.0 up to 8.3.5 | 8.1.288.2.188.3.5 |
php-minBitnami |
before 8.1.28, 8.2.0 up to 8.2.18, 8.3.0 up to 8.3.5 | 8.1.288.2.188.3.5 |
phpMageia:9 From an advisory covering 3 CVEs |
before 8.2.18-1.mga9 | 8.2.18-1.mga9 |
php8openSUSE:Tumbleweed From an advisory covering 4 CVEs |
before 8.3.6-1.1 | 8.3.6-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | MrBongoC/CVE-2024-1874 | 2024-07-18 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| affected, aliases, references | OSV | |
| first indexed | CVE List, EUVD, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-1874 is a critical vulnerability (CVSS 9.4) in Php, published April 12, 2024. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 32.8%, the 98th percentile. Fixed in php81 8.1.28-r0.
References
github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7
openwall.com/lists/oss-security/2024/04/12/11
security.netapp.com/advisory/ntap-20240510-0009
openwall.com/lists/oss-security/2024/06/07/1
lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B
lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK
Show 15 moreShow less
vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585
lists.fedoraproject.org/archives/list/[email protected]/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY
lists.fedoraproject.org/archives/list/[email protected]/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY
kb.cert.org/vuls/id/123335
security.alpinelinux.org/vuln/CVE-2024-1874
nvd.nist.gov/vuln/detail/CVE-2024-1874
docs.bell-sw.com/security/cves/CVE-2024-1874
github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1874.json
advisories.mageia.org/MGASA-2024-0132.html
bugs.mageia.org/show_bug.cgi?id=33093
php.net/ChangeLog-8.php
suse.com/security/cve/CVE-2022-31629
suse.com/security/cve/CVE-2024-1874
suse.com/security/cve/CVE-2024-2757
suse.com/security/cve/CVE-2024-3096