PHP-CGI OS Command Injection Vulnerability
Exploited since 2024-06-12. No WAF vendor names it yet. Our CRS test: blocked.
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… More
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.
Edge coverage
Claimed by vendorsAsk Vigil
AI · answers from this pageWorkers AI (Llama 3.3). Can be wrong: check the cited source.
Severity, decoded
CVSS 3.1Exploitable over the network, with no privileges and no user interaction, leading to full loss of confidentiality, integrity and availability.
How the score is built
- Attack vectorAn attacker can reach it over the internet; no access to your network needed.Network
- Attack complexityNo special conditions are needed; the attack works reliably.Low
- Privileges requiredNo account or login is needed.None
- User interactionNo one has to click or open anything; the attack works on its own.None
- ScopeThe damage stays within the vulnerable component.Unchanged
- Confidentiality impactAn attacker can read all data the affected component holds, or the most sensitive parts of it.High
- Integrity impactAn attacker can change any data or files the affected component protects.High
- Availability impactAn attacker can take the component down completely or keep it from serving anyone.High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAttackers are exploiting this in the wild.
Attackers can script the attack end to end and hit many targets at once.
A successful attack gives full control over the affected software or all of its data.
Public exploits
3 found- MetasploitPHP CGI Argument Injection Remote Code Execution2024-06-06 · exploit · rank Excellent · has check
- Exploit-DBPHP CGI Module 8.3.4 - Remote Code Execution (RCE)2025-06-15 · webapps · php
- NucleiCVE-2024-4577.yamldetection template, replayed in our lab
Links are to third-party code: never run it outside an isolated lab.
Timeline
- 2024-06-06Metasploit module publishedPHP CGI Argument Injection Remote Code Execution
- 2024-06-09CVE publishedCVE List
- 2024-06-12Added to CISA KEVConfirmed exploitation in the wild
- 2025-06-15Exploit published on Exploit-DBPHP CGI Module 8.3.4 - Remote Code Execution (RCE)
- 2026-11-02Our test: OWASP Core Rule Set blocked itparanoia level 1, anomaly threshold 5, default CRS settings
- 2026-11-02Our test: OWASP Core Rule Set blocked itparanoia level 2, anomaly threshold 5, default CRS settings
Vendor statements
QuotedCloudflareWAF Managed Rules
The CVE predates the oldest entry in this vendor's public feed, so a rule may exist that we cannot see.
AWSAWS WAF Managed Rules
We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. AWS often describes a vulnerability without naming its CVE (for example "Log4j"). We count only entries that name the CVE, so AWS coverage is understated.
Microsoft AzureFront Door and Application Gateway WAF (DRS)
We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. The rule tables name CVEs but carry no dates, so Azure is left out of every time-to-rule figure.
Google CloudCloud Armor preconfigured WAF rules
We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. Google names few CVEs: the release notes start in May 2024 and the rules reference lists CVEs without dates. Its cve-canary rules are opt-in.
FastlyNext-Gen WAF virtual patches
The CVE predates the oldest entry in this vendor's public feed, so a rule may exist that we cannot see.
F5Attack signatures (Distributed Cloud WAF)
We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. Each signature lists the CVEs it references, with its id and date. F5 does not state a default action; signatures enforce once staging ends in your policy.
AkamaiApp & API Protector (Adaptive Security Engine)
This vendor publishes no machine-readable rule changelog we can check.
OWASP CRSCore Rule Set (open source, used inside many WAFs)
We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. CRS rarely names CVEs: it relies on generic detections. Our own lab measures what it actually blocks.
Social
No posts seen yet on X, Bluesky, Mastodon, Hacker News or GitHub.