# CVE-2024-4577: Argument Injection in PHP-CGI

- Severity: Critical 9.8 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: yes. In CISA's catalogue since 2024-06-12; used in ransomware campaigns. Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
- Likelihood of exploitation in the next 30 days (EPSS): 99.9%, higher than 99% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 12 links below, marked "exploit"
- Published: 2024-06-09T19:42:36.464Z
- Modified: 2026-09-08T08:48:18.219Z
- Also known as: BIT-LIBPHP-2024-4577, BIT-PHP-2024-4577, BIT-PHP-MIN-2024-4577, GHSA-3qgc-jrrr-25jv
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation active, automatable yes, technical impact total
- Assigned by: php

## 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.

(As written by CVE List.)

## Affected

- PHP Group PHP: from 8.1.* before 8.1.29; from 8.2.* before 8.2.20; from 8.3.* before 8.3.8
- php_group 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
- 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
- fedoraproject fedora: 39; 40
- libphp (Bitnami): before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8
- php (Bitnami): before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8
- php-min (Bitnami): before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8

## Every score

- php: 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`
- NVD: 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`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv> (exploit, advisory, third-party-advisory)
- <https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/> (exploit, advisory, third-party-advisory)
- <https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/> (exploit, advisory, press/media-coverage, third-party-advisory)
- <https://github.com/11whoami99/CVE-2024-4577> (exploit, evidence)
- <https://github.com/xcanwin/CVE-2024-4577-PHP-RCE> (exploit, advisory, third-party-advisory)
- <https://github.com/rapid7/metasploit-framework/pull/19247> (exploit, fix, issue-tracking, patch)
- <https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/> (exploit, advisory, third-party-advisory)
- <https://github.com/watchtowrlabs/CVE-2024-4577> (exploit, advisory, third-party-advisory)
- <https://isc.sans.edu/diary/30994> (exploit, advisory, third-party-advisory)
- <https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577> (exploit, advisory, third-party-advisory)
- <https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577> (exploit, advisory, third-party-advisory)
- <https://blog.talosintelligence.com/new-persistent-attacks-japan/> (exploit, advisory, third-party-advisory)
- <https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html> (advisory, third-party-advisory)
- <https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/> (advisory, third-party-advisory)
- <https://www.php.net/ChangeLog-8.php#8.1.29> (article, release-notes)
- <https://www.php.net/ChangeLog-8.php#8.2.20> (article, release-notes)
- <https://www.php.net/ChangeLog-8.php#8.3.8> (article, release-notes)
- <https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately> (advisory, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/06/07/1> (advisory, mailing-list, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/> (discussion, mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/> (discussion, mailing-list)
- <https://security.netapp.com/advisory/ntap-20240621-0008/> (advisory, third-party-advisory)
- <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577> (government-resource, us-government-resource, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-4577> (kev, web)
- <https://www.php.net/ChangeLog-8.php#> (kev)

## Sources

- CVE List: [CVE-2024-4577](https://www.cve.org/CVERecord?id=CVE-2024-4577), CVE Terms of Use, modified 2025-10-21
- NVD: [CVE-2024-4577](https://nvd.nist.gov/vuln/detail/CVE-2024-4577), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2024-4577](https://osv.dev/vulnerability/BIT-LIBPHP-2024-4577), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2024-4577](https://osv.dev/vulnerability/BIT-PHP-2024-4577), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2024-4577](https://osv.dev/vulnerability/BIT-PHP-MIN-2024-4577), Apache-2.0, modified 2026-09-08
- CISA KEV: [CVE-2024-4577](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2024-4577), CC0-1.0, modified 2024-06-12

---

Page: https://cve.day/CVE-2024-4577 · Whole record: https://cve.day/CVE-2024-4577.json · Rebuilt by cve.day 2026-11-25T22:58:41.606Z
