Skip to main content
Public proof of conceptFix available

CVE-2024-5585

A public proof of concept exists; no exploitation attested.

  • Published2024-06-09
  • Fixed in8.3.8 · 8.2.20 · 8.1.29
  • WeaknessCWE-116 · CWE-78

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2024-06-0919:15CVE publishedNVD

Versions per branch

NVD · CISA-ADP · OSV
PHP
BranchAffectedFixed in
8.3≥ 8.3.0, < 8.3.88.3.8
8.2≥ 8.2.0, < 8.2.208.2.20
8.1≥ 8.1.0, < 8.1.298.1.29
8.1< 8.1.298.1.29
Fedoraproject fedora
BranchAffectedFixed in
40.x= 40no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As php, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHP Group PHPother versions: affected

    https://github.com/php/php-srcplatforms: Windows

    Affected
    • ≥ 8.1.*, < 8.1.29fixed in 8.1.29semver
    • ≥ 8.2.*, < 8.2.20fixed in 8.2.20semver
    • ≥ 8.3.*, < 8.3.8fixed in 8.3.8semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-06-09

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • phpAzure Linux:3all versions · fixed in 8.3.8-1
  • phpAzure Linux:2all versions · fixed in 8.1.29-1
  • php-8.1Wolfiall versions · fixed in 8.1.29-r0
  • php-8.1Chainguardall versions · fixed in 8.1.29-r0
  • php-8.2Wolfiall versions · fixed in 8.2.20-r0
  • php-8.2Chainguardall versions · fixed in 8.2.20-r0
  • php81Alpine:v3.19all versions · fixed in 8.1.29-r0
  • php82Alpine:v3.19all versions · fixed in 8.2.20-r0

1 more package range on OSV.dev

Vendor advisories

  • CVE-2024-5585 Red Hat Product Security

    php: Arguments execute arbitrary commands in Windows shell

Full record on NVD

Fix

  1. Update PHP to 8.3.8 · 8.2.20 · 8.1.29

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2024-07-16
  • CNACVSS 3.17.7known since 2026-10-23
  • NVDCVSS 3.18.8read 2026-10-23
  • CNAweakness (CWE)CWE-116, CWE-78known since 2026-10-23
  • NVDweakness (CWE)CWE-116read 2026-10-23
  • FIRST EPSSEPSS score28.8 %read 2026-11-09
  • OSVaffected packages—
  • GitHub Advisoriesadvisory—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
2024-06-09
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-9fcc-425m-g385

Frequently asked questions

What is 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 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.

Is CVE-2024-5585 actively exploited?

A proof-of-concept exploit exists for CVE-2024-5585, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2024-5585?

CVE-2024-5585 has a CVSS v3 base score of 8.8 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record