{"schemaVersion":3,"id":"CVE-2024-5585","aliases":["CGA-jv4q-p359-w7v3","CGA-mjpm-2qjw-28v3","CGA-q9m5-f977-g33g","CGA-qgc7-7w5c-6ww6"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2024-06-09T18:36:50.477Z","modified":"2025-02-13T17:54:21.435Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Wolfi","score":7.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L","exploitability":5.6,"impact":9.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":7.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L","exploitability":5.6,"impact":9.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.28807,"percentile":0.98138,"severity":"high","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.28807},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.28807,"percentile":0.98138}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.28807,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.28807,"percentile":0.98138}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_PHP_PHP-SRC","name":"Php Src","source":"github","url":"https://github.com/php/php-src/commit/fb58e69a84f4fde603a630d2c9df2fa3be16d846","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","description":"The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output","description":"The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/116.html"}],"affected":[{"vendor":"chainguard","product":"php-8.1","name":"php-8.1","label":"php-8.1","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/php-8.1","purlType":"apk","versions":[{"text":"< 8.1.29-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 8.1.29-r0","eol":null,"hubHref":null},{"vendor":"chainguard","product":"php-8.2","name":"php-8.2","label":"php-8.2","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/php-8.2","purlType":"apk","versions":[{"text":"< 8.2.20-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 8.2.20-r0","eol":null,"hubHref":null},{"vendor":"wolfi","product":"php-8.1","name":"php-8.1","label":"php-8.1","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/php-8.1","purlType":"apk","versions":[{"text":"< 8.1.29-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 8.1.29-r0","eol":null,"hubHref":null},{"vendor":"wolfi","product":"php-8.2","name":"php-8.2","label":"php-8.2","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/php-8.2","purlType":"apk","versions":[{"text":"< 8.2.20-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 8.2.20-r0","eol":null,"hubHref":null},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"40","noFixRecorded":false,"fixedIn":null}],"versionsText":"40","eol":{"isEol":true,"eolDate":"2025-05-13T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"40","label":"40","eolFrom":"2025-05-13T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"php_group","product":"php","name":"PHP","label":"php","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 8.1.*, < 8.1.29","noFixRecorded":false,"fixedIn":null},{"text":"≥ 8.2.*, < 8.2.20","noFixRecorded":false,"fixedIn":null},{"text":"≥ 8.3.*, < 8.3.8","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 8.1.*, < 8.1.29 | ≥ 8.2.*, < 8.2.20 | ≥ 8.3.*, < 8.3.8","eol":null,"hubHref":"/vendor/php_group/php"},{"vendor":"php","product":"php","name":"PHP","label":"php","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 8.1.0, < 8.1.29","noFixRecorded":false,"fixedIn":null},{"text":"≥ 8.2.0, < 8.2.20","noFixRecorded":false,"fixedIn":null},{"text":"≥ 8.3.0, < 8.3.8","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 8.1.0, < 8.1.29 | ≥ 8.2.0, < 8.2.20 | ≥ 8.3.0, < 8.3.8","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"php","label":"PHP","category":"lang"}},"hubHref":"/vendor/php/php"}],"affectedCount":7,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385","label":"github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385","hostname":"github.com","tags":["Advisory","Exploit","Third Party Advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/07/1","label":"www.openwall.com/lists/oss-security/2024/06/07/1","hostname":"www.openwall.com","tags":["WEB","Mailing List","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["WEB","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["WEB"]},{"url":"https://security.netapp.com/advisory/ntap-20240726-0002/","label":"security.netapp.com/advisory/ntap-20240726-0002/","hostname":"security.netapp.com","tags":["Advisory"]},{"url":"https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585","label":"www.vicarius.io/vsociety/…","hostname":"www.vicarius.io","tags":["WEB"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5585.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5585.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5585","label":"nvd.nist.gov/vuln/detail/CVE-2024-5585","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://github.com/php/php-src","label":"github.com/php/php-src","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-64X3-8RFH-JPQF","CGA-7423-79R3-4W7Q","CGA-7XPG-X857-4QF9"]},"timeline":[{"kind":"published","date":"2024-06-09T18:36:50.477Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-02-13T17:54:21.435Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":51,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T19:57:25.289Z","stale":false,"partial":false}}