cve.bz

CVE-2024-5585 Improper Encoding or Escaping of Output

8.8 highExploit referenceEPSS 29%

High (8.8). EPSS 29% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
29% (unchanged from 29% a week ago; 29% 30 days ago) estimated probability of exploitation activity in the next 30 days; 98th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-07-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-116 Improper Encoding or Escaping of Output
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-5585 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-5585?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-5585?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-5585 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
PHP Group PHPfrom 8.1.* before 8.1.29
PHP Group PHPfrom 8.2.* before 8.2.20
PHP Group PHPfrom 8.3.* before 8.3.8

Linux distributions

DistributionReleasePackageFixed inAdvisory
Alpinev3.19php818.1.29-r0ALPINE-CVE-2024-5585
Alpinev3.19php828.2.20-r0ALPINE-CVE-2024-5585
Alpinev3.19php838.3.8-r0ALPINE-CVE-2024-5585
Azure Linux2php8.1.29-1AZL-42427
Azure Linux3php8.3.8-1AZL-42439

From the distributions' data via OSV.dev: the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

No Red Hat products are affected by this CVE.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10phpNot affected
Red Hat Enterprise Linux 6phpNot affected
Red Hat Enterprise Linux 7phpNot affected
Red Hat Enterprise Linux 8php:7.4/phpNot affected
Red Hat Enterprise Linux 8php:8.0/phpNot affected
Red Hat Enterprise Linux 8php:8.2/phpNot affected
Red Hat Enterprise Linux 9phpNot affected
Red Hat Enterprise Linux 9php:8.1/phpNot affected
Red Hat Enterprise Linux 9php:8.2/phpNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-5585.

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High
  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON