CVE-2024-5585

Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)

Published Jun 9, 2024 CVSS 3.1 · 7.7 High EPSS 28.8% KEV · Not listed
Description
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. Original issue: 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

Source ID Title
EUVD EUVD EUVD-2024-46774 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. Original issue: 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.
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00674}

epss

{'score': 0.00903}

Type Values Removed Values Added
Metrics epss

{'score': 0.00838}

epss

{'score': 0.00674}

Type Values Removed Values Added
Metrics epss

{'score': 0.00936}

epss

{'score': 0.00838}

Type Values Removed Values Added
Metrics epss

{'score': 0.00794}

epss

{'score': 0.00936}

Weaknesses

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Feb 13, 2025, 5:54 PM
Reserved
Jun 1, 2024, 12:08 AM
Status
Modified
Published
Jun 9, 2024, 7:15 PM
Modified
Jun 17, 2026, 8:16 AM
Severity
Important
Public date
Jun 7, 2024, 12:00 AM