CVE-2024-4577
Argument Injection in PHP-CGI
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.8
Argument Injection in PHP-CGI
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.
- Record
CVE-2024-4577- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2024-44188
9.8
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.
- Record
EUVD-2024-44188- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vxpp-6299-mxw3
9.8
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache...
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.
- Record
GHSA-vxpp-6299-mxw3- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
CISA KEV No score
PHP-CGI OS Command Injection Vulnerability
PHP, specifically Windows-based PHP used in CGI mode, contains an OS command injection vulnerability that allows for arbitrary code execution. This vulnerability is a patch bypass for CVE-2012-1823.
- Record
CVE-2024-4577- Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
9.8
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.
- Record
CVE-2024-4577- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVALPINE-CVE-2024-4577
9.8
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.
- Record
ALPINE-CVE-2024-4577- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
Show 8 moreShow less
OSVAZL-42424
9.8
CVE-2024-4577 affecting package php for versions less than 8.1.29-1
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.
- Record
AZL-42424- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVAZL-42433
9.8
CVE-2024-4577 affecting package php for versions less than 8.3.8-1
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.
- Record
AZL-42433- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-05
OSVBELL-CVE-2024-4577
9.8
CVE-2024-4577 does not affect BellSoft software
- Record
BELL-CVE-2024-4577- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
9.8
Argument Injection in PHP-CGI
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.
- Record
CVE-2024-4577- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVBIT-libphp-2024-4577 No score
Argument Injection in PHP-CGI
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.
- Record
BIT-libphp-2024-4577- Updated
- 2026-11-02
OSVBIT-php-2024-4577 No score
Argument Injection in PHP-CGI
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.
- Record
BIT-php-2024-4577- Updated
- 2026-11-02
OSVBIT-php-min-2024-4577 No score
Argument Injection in PHP-CGI
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.
- Record
BIT-php-min-2024-4577- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14376-1 No score
php8-8.3.12-1.1 on GA media
These are all security issues fixed in the php8-8.3.12-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14376-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
php81Alpine:v3.19 |
before 8.1.29-r0 | 8.1.29-r0 |
php82Alpine:v3.19 |
before 8.2.20-r0 | 8.2.20-r0 |
php83Alpine:v3.19 |
before 8.3.8-r0 | 8.3.8-r0 |
phpAzure Linux:2 |
before 8.1.29-1 | 8.1.29-1 |
phpAzure Linux:3 |
before 8.3.8-1 | 8.3.8-1 |
libphpBitnami |
before 8.1.29, 8.2.0 up to 8.2.20, 8.3.0 up to 8.3.8 | 8.1.298.2.208.3.8 |
phpBitnami |
before 8.1.29, 8.2.0 up to 8.2.20, 8.3.0 up to 8.3.8 | 8.1.298.2.208.3.8 |
php-minBitnami |
before 8.1.29, 8.2.0 up to 8.2.20, 8.3.0 up to 8.3.8 | 8.1.298.2.208.3.8 |
php8openSUSE:Tumbleweed From an advisory covering 4 CVEs |
before 8.3.12-1.1 | 8.3.12-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Metasploit | PHP CGI Argument Injection Remote Code Execution | 2024-06-06 |
| PoC in GitHub | 11whoami99/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | Ra1n-60W/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | Sysc4ll3r/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | TAM-K592/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | WanLiChangChengWanLiChang/CVE-2024-4577-RCE-EXP | 2024-06-07 |
| PoC in GitHub | graphite-org/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | huseyinstif/CVE-2024-4577-Nuclei-Template | 2024-06-07 |
| PoC in GitHub | princew88/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | taida957789/CVE-2024-4577 | 2024-06-07 |
Show 18 moreShow less
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | watchtowrlabs/CVE-2024-4577 | 2024-06-07 |
| PoC in GitHub | 0x20c/CVE-2024-4577-nuclei | 2024-06-08 |
| PoC in GitHub | ZephrFish/CVE-2024-4577-PHP-RCE | 2024-06-08 |
| PoC in GitHub | manuelinfosec/CVE-2024-4577 | 2024-06-08 |
| PoC in GitHub | xcanwin/CVE-2024-4577-PHP-RCE | 2024-06-08 |
| PoC in GitHub | zomasec/CVE-2024-4577 | 2024-06-08 |
| PoC in GitHub | Chocapikk/CVE-2024-4577 | 2024-06-09 |
| PoC in GitHub | dbyMelina/CVE-2024-4577 | 2024-06-09 |
| PoC in GitHub | BLACK-ARCHIVERS/CVE-2024-4577 | 2024-06-11 |
| PoC in GitHub | bl4cksku11/CVE-2024-4577 | 2024-06-11 |
| PoC in GitHub | 0XFFFF-XD/CVE-2024-4577-PHP-CGI-RCE | 2024-06-12 |
| PoC in GitHub | Entropt/CVE-2024-4577_Analysis | 2024-06-12 |
| PoC in GitHub | aavamin/cve-2024-4577 | 2024-06-12 |
| PoC in GitHub | d3ck4/Shodan-CVE-2024-4577 | 2024-06-12 |
| PoC in GitHub | Sh0ckFR/CVE-2024-4577 | 2024-06-13 |
| PoC in GitHub | gotr00t0day/CVE-2024-4577 | 2024-06-15 |
| Exploit-DB | PHP CGI Module 8.3.4 - Remote Code Execution (RCE) | 2025-06-15 |
| Nuclei | PHP CGI - Argument Injection |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| exploitation | ||
| affected, aliases, references | OSV | |
| exploits, exploits_more | ||
| exploits | ||
| first indexed | CVE List, EUVD, Exploit-DB, GitHub Advisories, CISA KEV, Metasploit, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-4577 is a critical vulnerability (CVSS 9.8) in Php, published June 9, 2024. CISA lists it as known to be exploited, since June 12, 2024. EUVD reports exploitation since June 12, 2024. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 100.0%, the 99th percentile. Fixed in php81 8.1.29-r0.
References
github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en
arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers
imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577
github.com/11whoami99/CVE-2024-4577
Show 26 moreShow less
github.com/xcanwin/CVE-2024-4577-PHP-RCE
github.com/rapid7/metasploit-framework/pull/19247
labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577
github.com/watchtowrlabs/CVE-2024-4577
php.net/ChangeLog-8.php
cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
isc.sans.edu/diary/30994
openwall.com/lists/oss-security/2024/06/07/1
lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B
lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK
security.netapp.com/advisory/ntap-20240621-0008
cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577
vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577
vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577
blog.talosintelligence.com/new-persistent-attacks-japan
nvd.nist.gov/vuln/detail/CVE-2024-4577
github.com/advisories/GHSA-vxpp-6299-mxw3
security.alpinelinux.org/vuln/CVE-2024-4577
docs.bell-sw.com/security/cves/CVE-2024-4577
github.com/CVEProject/cvelistV5/tree/main/cves/2024/4xxx/CVE-2024-4577.json
github.com/php/php-src
lists.opensuse.org/archives/list/[email protected]/thread/RM3WP4ENMVRYGM7IU7L7DTX3KTTN5UHE
suse.com/security/cve/CVE-2024-4577
suse.com/security/cve/CVE-2024-8925
suse.com/security/cve/CVE-2024-8927
suse.com/security/cve/CVE-2024-9026
The full exploit list has 48 more links.