Every CVE Search/ Get API key

CVE-2024-1874

Command injection via array-ish $command parameter of proc_open()

9.4 CriticalPublic exploitFix available

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

32.8%Up 32.8 points since Apr 29, 2024
90%50%10%1%

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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 \n in $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

Affected packages
PackageAffectedFixed
php81
Alpine:v3.19
before 8.1.28-r0
8.1.28-r0
php82
Alpine:v3.19
before 8.2.18-r0
8.2.18-r0
php82
Alpine:v3.20
before 8.2.18-r0
8.2.18-r0
php82
Alpine:v3.21
before 8.2.18-r0
8.2.18-r0
php82
Alpine:v3.22
before 8.2.18-r0
8.2.18-r0
php83
Alpine:v3.19
before 8.3.6-r0
8.3.6-r0
php83
Alpine:v3.20
before 8.3.5-r0
8.3.5-r0
php83
Alpine:v3.21
before 8.3.5-r0
8.3.5-r0
php83
Alpine:v3.22
before 8.3.5-r0
8.3.5-r0
php83
Alpine:v3.23
before 8.3.5-r0
8.3.5-r0
Show 9 moreShow less
Affected packages
PackageAffectedFixed
php83
Alpine:v3.24
before 8.3.5-r0
8.3.5-r0
php
Azure Linux:3
before 8.3.8-1
8.3.8-1
php81
Alpaquita:23
8.1.19-r0 up to 8.1.28-r0
8.1.28-r0
php83
Alpaquita:stream
8.3.4-r2 up to 8.3.6-r0
8.3.6-r0
libphp
Bitnami
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
Bitnami
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-min
Bitnami
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
Mageia:9
From an advisory covering 3 CVEs
before 8.2.18-1.mga9
8.2.18-1.mga9
php8
openSUSE: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.

Public exploits
SourceLinkDate
PoC in GitHubMrBongoC/CVE-2024-18742024-07-18

History

History
RecordedChangedSources
affected
factsOSV
affected, aliases, referencesOSV
first indexedCVE 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

Show 15 moreShow less
MoveEnter Open