A PHP CGI Vulnerability Scanner for CVE-2024-4577# PHP CGI Scanner
## Screenshot

## Overview
**PHP CGI Scanner** is a Python 3 utility designed to help identify
systems potentially exposed to
[CVE-2024-4577](https://nvd.nist.gov/vuln/detail/CVE-2024-4577).\
It checks for visible PHP versions, common CGI endpoints, and phpinfo
outputs to provide a quick risk assessment.
> **Disclaimer:** This tool is for authorized security testing only. Use
> responsibly.
## Features
- Detects PHP version from headers and phpinfo output.
- Scans for common PHP-CGI endpoints.
- Classifies server API (CGI, FPM, module).
- Provides clear verdicts (SAFE, POTENTIALLY VULNERABLE,
INCONCLUSIVE).
- Optional colorized output and ASCII banners.
## Requirements
- Python 3.6+
- [requests](https://pypi.org/project/requests/)
- [colorama](https://pypi.org/project/colorama/) (optional)
- [pyfiglet](https://pypi.org/project/pyfiglet/) (optional)
## Installation
Clone the repository and install dependencies:
``` bash
git clone https://github.com/yourusername/PHPCGIScanner.git
cd PHPCGIScanner
pip install -r requirements.txt
```
## Usage
### Basic Scan
``` bash
python3 PHPCGIScanner.py <target>
```
Example:
``` bash
python3 PHPCGIScanner.py http://example.com
```
### With phpinfo URL
``` bash
python3 PHPCGIScanner.py <target> --phpinfo-url http://example.com/phpinfo.php
```
### Ignore TLS Warnings
``` bash
python3 PHPCGIScanner.py <target> --insecure
```
## Exit Codes
- **0** -- SAFE / Not vulnerable
- **1** -- POTENTIALLY VULNERABLE (needs review)
- **2** -- UNKNOWN / Error
## Notes
- Vulnerable PHP versions checked:
- 8.3.0--8.3.7
- 8.2.0--8.2.19
- 8.1.0--8.1.28
- Designed for security engineers and penetration testers with
permission.
## License
MIT License. See `LICENSE` file for details.
[4.0K] /data/pocs/02b1855828fc33750e2dcb7d4e85510d3b64a327
├── [1.0K] LICENSE
├── [ 11K] PHPCGIScanner.py
├── [237K] poc.png
├── [1.8K] README.md
└── [ 27] requirements.txt
0 directories, 5 files