CVE-2024-4577Argument Injection in PHP-CGI
Updated under an hour ago ()
Does this affect you?
It affects PHP Group PHP and 2 other products. Add what you run to find out whether that includes you.
CISA lists it as known exploited since Jun 12, 2024; federal agencies had to remediate by Jul 3, 2024, and it is known to be used in ransomware. Treat that date as your deadline.
Do this next
Free account, 1 product
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.
- CVSS
- 9.8 CRITICAL (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weakness (CWE)
- CWE-78
- Known exploited
- Added to CISA KEV Jun 12, 2024; federal remediation due Jul 3, 2024; known ransomware useApply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
- EPSS (exploitation in the next 30 days)
- 99.99% (percentile 100)
- Assigned by
- php
- NVD analysis
- Analyzed
- Record last updated
- Oct 21, 2025
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
PHP Group PHP php_group:php (from the name) | from 8.1.* before 8.1.29; from 8.2.* before 8.2.20; from 8.3.* before 8.3.8 | CNA record |
php_group php php_group:php | from 8.1.0 before 8.1.29 | CISA ADP |
php php php:php | from 8.1.0 before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8 | NVD |
fedoraproject fedora fedoraproject:fedora | 39; 40 | NVD |
References
- https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jvexploit, third-party-advisory
- https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.htmlthird-party-advisory
- https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/exploit, third-party-advisory
- https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/exploit, press/media-coverage, third-party-advisory
- https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/third-party-advisory
- https://github.com/11whoami99/CVE-2024-4577exploit
- https://github.com/xcanwin/CVE-2024-4577-PHP-RCEexploit, third-party-advisory
- https://github.com/rapid7/metasploit-framework/pull/19247exploit, issue-tracking, patch
- https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/exploit, third-party-advisory
- https://github.com/watchtowrlabs/CVE-2024-4577exploit, third-party-advisory
- https://www.php.net/ChangeLog-8.php#8.1.29release-notes
- https://www.php.net/ChangeLog-8.php#8.2.20release-notes
- https://www.php.net/ChangeLog-8.php#8.3.8release-notes
- https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediatelythird-party-advisory
- https://isc.sans.edu/diary/30994exploit, third-party-advisory
- http://www.openwall.com/lists/oss-security/2024/06/07/1mailing-list, third-party-advisory
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/mailing-list
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/mailing-list
- https://security.netapp.com/advisory/ntap-20240621-0008/third-party-advisory
- https://blog.talosintelligence.com/new-persistent-attacks-japan/exploit, third-party-advisory
- https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577exploit, third-party-advisory
- https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577exploit, third-party-advisory
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577us-government-resource
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.