Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2024-4577 PoC — Argument Injection in PHP-CGI

Source
Associated Vulnerability
Title:Argument Injection in PHP-CGI (CVE-2024-4577)
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.
Description
CVE-2024-4577 Mass Scanner & Exploit Tool
Readme


# CVE-2024-4577 Mass Scanner & Exploit Tool (PoC)

This Python script automates the detection of servers vulnerable to **CVE-2024-4577**, a critical vulnerability in PHP-CGI that allows **remote code execution (RCE)** through specially crafted query parameters.

The tool sends a PHP payload (`<?php phpinfo(); ?>`) using `auto_prepend_file=php://input` and detects vulnerability by analyzing the server's response for signs of successful code execution.

<br>

# Affected Versions

based on the original [https://devco.re/](https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/) This vulnerability affects all versions of PHP installed on the Windows operating system:
```
PHP 8.3 < 8.3.8
PHP 8.2 < 8.2.20
PHP 8.1 < 8.1.29
```

<br>

## Usage

```bash
pip install -r requirements.txt
```

```bash
python CVE-2024-4577.py list.txt 50
```

- `list.txt`: A file containing one domain per line
- `50`: Number of threads to use

<br>

## Output

- Vulnerable URLs are saved to `vulnerable.txt`

<br>

## Disclaimer

This tool is created **for educational purposes or authorized security assessments only**.  
Unauthorized scanning or exploitation of third-party systems is **illegal** and may violate service terms or criminal laws.  
Use responsibly.

<br>

**Coded by CirqueiraDev**
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →