CVE-2024-1874

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

Published Apr 29, 2024 CVSS 3.1 · 9.4 Critical EPSS 32.8% KEV · Not listed
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.

Remediation

Vendor Workaround

Using proc_open() string syntax avoids the problem.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Fedoraproject
Fedoraproject fedora
Php
Php php
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*
Vendors & Products Fedoraproject
Fedoraproject fedora
Php
Php php
Type Values Removed Values Added
First Time appeared Php Group
Php Group php
CPEs cpe:2.3:a:php_group:php:8.1.0:*:*:*:*:*:*:*
cpe:2.3:a:php_group:php:8.2.0:*:*:*:*:*:*:*
cpe:2.3:a:php_group:php:8.3.0:*:*:*:*:*:*:*
Vendors & Products Php Group
Php Group php
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.  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.
Weaknesses

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Nov 4, 2025, 6:22 PM
Reserved
Feb 25, 2024, 4:39 AM
Status
Modified
Published
Apr 29, 2024, 4:15 AM
Modified
Jun 17, 2026, 7:05 AM
Severity
Public date
Apr 9, 2024, 12:00 AM