S4E just found a high top 10 tcp port service scan
critical·Product Based Web Vulnerabilities·Updated Jun 10, 2024

CVE-2024-4577 Scanner

CVE-2024-4577 scanner - Argument Injection vulnerability in PHP CGI

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
2.8k
Times Used
continuous scan runs
3.4k
Continuously Checked
assets under CS
2
Vulnerabilities Found
confirmed findings
References
🔴
CISA Known Exploited Vulnerability
This CVE is actively exploited in the wild. CISA mandates federal agencies to patch immediately.
CVECVE-2024-4577
9.8
CVSScritical
Exploitable remotely over the internet · no authentication required.

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 Vector
Network
Privileges Req.
None
User Interaction
None
Affected
PHPby PHP Group
AFFECTED< 8.1.29SAFE ✓≥ 8.1.29
phpby php_group
AFFECTED< 8.1.29SAFE ✓≥ 8.1.29
phpby php_group
AFFECTED< 8.2.20SAFE ✓≥ 8.2.20
phpby php_group
AFFECTED< 8.3.8SAFE ✓≥ 8.3.8
Updated Aug 22, 2026View on NVD →
Detail

PHP CGI is a component used in web server environments to process PHP scripts via the Common Gateway Interface (CGI). It is widely deployed by web hosting providers and developers for executing PHP code on web servers. This software allows dynamic web applications to interact with users by processing form inputs, accessing databases, and generating web pages dynamically. PHP CGI is integral to many web applications due to its efficiency and ease of use. It is commonly found in both commercial and open-source web applications.

The vulnerability in PHP CGI involves a critical argument injection flaw. This flaw allows an attacker to manipulate CGI parameters and inject arbitrary code. Exploiting this vulnerability can result in remote code execution on the affected server. The impact of this vulnerability is severe, as it can lead to full compromise of the server.

The vulnerability exploits a flaw in the handling of CGI parameters by PHP CGI. By injecting specially crafted arguments, an attacker can bypass security restrictions and execute arbitrary PHP code. The vulnerable endpoints include PHP script files like php-cgi.exe, index.php, test.php, and others. Parameters such as cgi.force_redirect and allow_url_include can be manipulated to include malicious code. The exploit involves sending a POST request with the payload embedded in the URL and body, triggering the code execution.

Exploiting this vulnerability can lead to complete server compromise. Attackers can execute arbitrary code, gain unauthorized access to sensitive data, and manipulate server configurations. This could result in data breaches, defacement of websites, and disruption of web services. In severe cases, attackers may use the compromised server to launch further attacks on other systems.

By using the S4E platform, you can ensure comprehensive monitoring and protection of your digital assets. Our platform provides automated scans and detailed reports, helping you identify and remediate vulnerabilities before they are exploited. With our extensive library of security checks, you can stay ahead of potential threats and maintain the security and integrity of your systems. Join us today to enhance your cybersecurity posture and protect your valuable data from malicious attacks.

References:

Solution Advice
  • Apply the vendor-supplied patches or upgrade to a non-vulnerable version of PHP CGI.
  • Disable the PHP CGI if not needed and use alternative secure configurations.
  • Implement strict input validation and sanitization on all user inputs.
  • Configure the web server to restrict access to PHP CGI scripts to trusted users only.
  • Regularly update and maintain your web server and PHP environment to prevent exploitation of known vulnerabilities.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2024-4577 scanner - Argument Injection vulnerability in PHP CGI S4E