CVE-2024-5585
published high CVSS 3.1 · 7.7Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| PHP Group | — | PHP8.1.* to < 8.1.29 · 8.2.* to < 8.2.20 · 8.3.* to < 8.3.8 · Other versions: affected · Platforms: Windows | Affected | Not stated | php |
| php | — | php8.1.0 to < 8.1.29 · Other versions: affected | Affected | Not stated | CISA-ADP |
| php | — | php8.2.0 to < 8.2.20 · Other versions: affected | Affected | Not stated | CISA-ADP |
| php | — | php8.3.0 to < 8.3.8 · Other versions: affected | Affected | Not stated | CISA-ADP |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Alpine Linux | v3.19 | php81 | Fixed | 8.1.29-r0 | Package fix record |
| Alpine Linux | v3.19 | php82 | Fixed | 8.2.20-r0 | Package fix record |
Show 1 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.19 | php83 | Fixed | 8.3.8-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.7 / 10
- Severity
- high
- Provider
- php · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| PHP Group | PHP | 8.1.* to < 8.1.29 (affected · semver)8.2.* to < 8.2.20 (affected · semver)8.3.* to < 8.3.8 (affected · semver)Default: affected | php · cna |
| php | php | 8.1.0 to < 8.1.29 (affected · semver)Default: affected | CISA-ADP · adp |
| php | php | 8.2.0 to < 8.2.20 (affected · semver)Default: affected | CISA-ADP · adp |
| php | php | 8.3.0 to < 8.3.8 (affected · semver)Default: affected | CISA-ADP · adp |
Weaknesses
2- CWE-116 CWE-116 Improper Encoding or Escaping of Output
- CWE-78 CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
6- http://www.openwall.com/lists/oss-security/2024/06/07/1
- https://github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- https://security.netapp.com/advisory/ntap-20240726-0002/
- https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585
Provider assertions
3php · cna
Command injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- ca004d018c2ee708cabf0f99bbf0fd9db19d720b9c4f5eebd78dbfe2898ef4f7
- Ingested
- 23 Sep 2026, 08:32:47 UTC
- Source record
- Official CVE record