Php: Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix) (CVE-2024-5585)
CVE-2024-5585 is a command injection vulnerability in PHP affecting versions before 8.1.29, 8.2.20, and 8.3.8. It bypasses the fix for CVE-2024-1874 when the command name includes trailing spaces. The vulnerability arises from insufficient escaping in proc_open() when used with array syntax, allowing an attacker controlling command arguments to execute arbitrary commands on Windows shells.
AI Analysis
Technical Summary
This vulnerability in PHP proc_open() affects versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8. The original fix for CVE-2024-1874 is bypassed if the command name contains trailing spaces. Due to insufficient escaping of arguments in the array syntax of proc_open(), a malicious user can supply crafted arguments that lead to arbitrary command execution on Windows systems.
Potential Impact
An attacker able to control the arguments passed to proc_open() can execute arbitrary commands on the Windows shell, potentially leading to full system compromise or unauthorized actions. This elevates the risk of remote code execution in affected PHP environments.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade to PHP versions 8.1.29 or later, 8.2.20 or later, and 8.3.8 or later to mitigate this issue. Applying these official fixes will prevent the bypass of the previous CVE-2024-1874 patch. No additional mitigation steps are indicated by the vendor advisory.
Php: Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix) (CVE-2024-5585)
Description
CVE-2024-5585 is a command injection vulnerability in PHP affecting versions before 8.1.29, 8.2.20, and 8.3.8. It bypasses the fix for CVE-2024-1874 when the command name includes trailing spaces. The vulnerability arises from insufficient escaping in proc_open() when used with array syntax, allowing an attacker controlling command arguments to execute arbitrary commands on Windows shells.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in PHP proc_open() affects versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8. The original fix for CVE-2024-1874 is bypassed if the command name contains trailing spaces. Due to insufficient escaping of arguments in the array syntax of proc_open(), a malicious user can supply crafted arguments that lead to arbitrary command execution on Windows systems.
Potential Impact
An attacker able to control the arguments passed to proc_open() can execute arbitrary commands on the Windows shell, potentially leading to full system compromise or unauthorized actions. This elevates the risk of remote code execution in affected PHP environments.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade to PHP versions 8.1.29 or later, 8.2.20 or later, and 8.3.8 or later to mitigate this issue. Applying these official fixes will prevent the bypass of the previous CVE-2024-1874 patch. No additional mitigation steps are indicated by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BIT-php-2024-5585
- Osv Schema Version
- 1.5.0
- Aliases
- ["CVE-2024-5585"]
- Ecosystems
- ["Bitnami"]
- Database Specific Severity
- High
Threat ID: 6aa005deacd9273b49ab606c
Added to database: 09/08/2026, 12:55:58 UTC
Last enriched: 09/08/2026, 13:27:37 UTC
Last updated: 09/10/2026, 19:36:49 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.