CVE-2024-4577
Argument Injection in PHP-CGI
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
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.
Official description from the CVE record, published by php. Copyright © 1999-2026 The MITRE Corporation. See /security/cve/legal for the CVE license. View the record on cve.org
Key data
CVSS 3.1 Critical 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector: Network
The vulnerable component can be reached over a network, possibly from the Internet.
Attack complexity: Low
No special conditions are needed. The attack can be repeated at will.
Privileges required: None
No account or privileges are needed.
User interaction: None
No action from any user is needed.
Scope: Unchanged
The impact stays within the vulnerable component.
Confidentiality impact: High
Serious or total effect on the secrecy of data.
Integrity impact: High
Serious or total effect on the trustworthiness of data.
Availability impact: High
Serious or total effect on availability.
| Metric | Value | What it means |
|---|---|---|
| Attack vector | Network | The vulnerable component can be reached over a network, possibly from the Internet. |
| Attack complexity | Low | No special conditions are needed. The attack can be repeated at will. |
| Privileges required | None | No account or privileges are needed. |
| User interaction | None | No action from any user is needed. |
| Scope | Unchanged | The impact stays within the vulnerable component. |
| Confidentiality impact | High | Serious or total effect on the secrecy of data. |
| Integrity impact | High | Serious or total effect on the trustworthiness of data. |
| Availability impact | High | Serious or total effect on availability. |
CVSS is owned and managed by FIRST.Org, Inc. (FIRST) and is used by permission. Each CVSS score on this site is shown together with its vector string, as published in the CVE record by the source named next to it. Learn more at first.org/cvss.
EPSS
- Score
- 0.99987 (99.98% probability)
- Percentile
- 99.98%
- Scores of
- Nov 10, 2026
- Model
- v2026.06.15
CISA Known Exploited Vulnerabilities
- Name in the catalog
- PHP-CGI OS Command Injection Vulnerability
- Added to the catalog
- Jun 12, 2024
- Federal due date
- Jul 3, 2024
- Ransomware campaigns
- Known use
CISA assessment as of Jun 15, 2024
- Exploitation
- Recorded by CISA as active
- Automatable
- yes
- Technical impact
- total
Weakness (CWE)
- CWE-78Improper Neutralization of Special Elements used in an OS Command
Affected products
PHP
- affected: 8.1.* up to before 8.1.29
- affected: 8.2.* up to before 8.2.20
- affected: 8.3.* up to before 8.3.8
References
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-2…
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.ht…
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-c…
- arstechnica.com/security/2024/06/php-vulnerability-allows-a…
- imperva.com/blog/imperva-protects-against-critical-php-vuln…
- github.com/11whoami99/CVE-2024-4577
- 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
- php.net/ChangeLog-8.php
- php.net/ChangeLog-8.php
- cert.be/en/advisory/warning-php-remote-code-execution-patch…
- isc.sans.edu/diary/30994
- openwall.com/lists/oss-security/2024/06/07/1
- lists.fedoraproject.org/archives/list/package-announce@list…
- lists.fedoraproject.org/archives/list/package-announce@list…
- security.netapp.com/advisory/ntap-20240621-0008
- vicarius.io/vsociety/posts/php-cgi-os-command-injection-vul…
- vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rc…
- blog.talosintelligence.com/new-persistent-attacks-japan
Timeline
- ID reserved
- Record published
- Added to CISA KEV
- Record last updated
Look up another CVE
About CubePath
Data from the CVE Program (MITRE), CISA KEV and FIRST EPSS. CVSS is owned by FIRST and used by permission. Not affiliated with or endorsed by MITRE, CISA or FIRST. Data as of Nov 10, 2026, 19:23 UTC. Sources and licenses