CVE-2024-4577
Critical 9.8KEV · exploitedPublic exploitFix availableArgument Injection in PHP-CGI
Record last updated
CVSS score
Critical on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Among the highest-scored CVEs. A prediction, not evidence.
CISA remediation deadline
Passed 871 days ago for U.S. federal agencies
Description
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc.
Weakness: CWE-78
Patching and mitigation
- Patch status
- Fix available (source: CVE record (php))
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- php.net (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| PHP Group | PHP | from 8.1.* before 8.1.29 | 8.1.29 | CVE Program |
| PHP Group | PHP | from 8.2.* before 8.2.20 | 8.2.20 | CVE Program |
| PHP Group | PHP | from 8.3.* before 8.3.8 | 8.3.8 | CVE Program |
| PHP Group | PHP | Not documented | Not documented | CISA KEV |
Timeline
Disclosure
CVE record published by php
Source: CVE Program (opens in a new tab)
12 Jun 2024KEV
Added to the CISA Known Exploited Vulnerabilities catalog
Source: CISA KEV (opens in a new tab)
12 Jun 2024Exploitation
Exploitation confirmed by CISA KEV
Source: CISA KEV (opens in a new tab)
Patch
Fix documented by CVE record (php)
Vendor guidance and references
- https://www.php.net/ChangeLog-8.php (opens in a new tab)vendor-advisory, x_transferred
- http://www.openwall.com/lists/oss-security/2024/06/07/1 (opens in a new tab)x_transferred
- https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/ (opens in a new tab)x_transferred
- https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html (opens in a new tab)x_transferred
- https://blog.talosintelligence.com/new-persistent-attacks-japan/ (opens in a new tab)
- https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately (opens in a new tab)x_transferred
- https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/ (opens in a new tab)x_transferred
- https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv (opens in a new tab)x_transferred
- https://github.com/rapid7/metasploit-framework/pull/19247 (opens in a new tab)x_transferred
- https://isc.sans.edu/diary/30994 (opens in a new tab)x_transferred
- https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/ (opens in a new tab)x_transferred
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ (opens in a new tab)x_transferred
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ (opens in a new tab)x_transferred
- https://nvd.nist.gov/vuln/detail/CVE-2024-4577 (opens in a new tab)government
- https://security.netapp.com/advisory/ntap-20240621-0008/ (opens in a new tab)x_transferred
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577 (opens in a new tab)government-resource
- https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/ (opens in a new tab)x_transferred
- https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577 (opens in a new tab)
- https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577 (opens in a new tab)
Public exploit code
Exploit or proof-of-concept code is publicly available on Exploit-DB. Shown as a prioritization and defensive-testing signal — treat exploit code as hostile and run it only against systems you are authorized to test.