cbcvebase.
CVE-2024-5585
published 2024-06-09

CVE-2024-5585: 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…

PriorityP271high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
28.81%
97.9th percentile
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.

Affected

10 ranges
VendorProductVersion rangeFixed in
debianphp7.4
debianphp8.2
fedoraprojectfedora
msrcazl3_php_8.3.6-1_on_azure_linux_3.0
msrcazl3_php_8.3.8-1_on_azure_linux_3.0
msrccbl2_php_8.1.28-1_on_cbl_mariner_2.0
msrccbl2_php_8.1.29-1_on_cbl_mariner_2.0
phpphp>= 8.1.0 < 8.1.298.1.29
phpphp>= 8.2.0 < 8.2.208.2.20
phpphp>= 8.3.0 < 8.3.88.3.8

Detection & IOCsextracted from sources · hover to see the quote

  • Monitor for proc_open() calls using array syntax where command name includes trailing spaces, which bypasses the CVE-2024-1874 fix and may allow argument injection leading to arbitrary command execution in Windows shell.
  • Flag PHP applications running on Windows that invoke proc_open() with array-syntax command parameters, particularly where user-controlled input is passed as arguments — the bypass vector is a trailing space appended to the command name.
  • ·Vulnerability is Windows-specific (Windows shell argument escaping issue); Linux/Debian scope is listed as 'local' and Debian bullseye is marked resolved. Red Hat states no RHEL products are affected.
  • ·Affected PHP versions are 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8. Instances running these versions on Windows are the primary risk surface.
  • ·No Red Hat products are affected by this CVE across RHEL 6 through 10 and all php module streams.

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vendor_debian9.4LOW
vendor_redhat9.4CRITICAL
vendor_msrc8.8HIGH
vendor_oracle8.8HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.