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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-41773 PoC — Path traversal and file disclosure vulnerability in Apache HTTP Server 2.4.49

Source
Associated Vulnerability
Title:Path traversal and file disclosure vulnerability in Apache HTTP Server 2.4.49 (CVE-2021-41773)
Description:A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49. An attacker could use a path traversal attack to map URLs to files outside the directories configured by Alias-like directives. If files outside of these directories are not protected by the usual default configuration "require all denied", these requests can succeed. If CGI scripts are also enabled for these aliased pathes, this could allow for remote code execution. This issue is known to be exploited in the wild. This issue only affects Apache 2.4.49 and not earlier versions. The fix in Apache HTTP Server 2.4.50 was found to be incomplete, see CVE-2021-42013.
Description
Apache-HTTP-Server-2.4.50-RCE This tool is designed to test Apache servers for the CVE-2021-41773 / CVE-2021-42013 vulnerability. It is intended for educational purposes only and should be used responsibly on systems you have explicit permission to test.
Readme
# Apache-HTTP-Server-2.4.50-RCE

This tool is designed to test Apache servers for the CVE-2021-41773 / CVE-2021-42013 vulnerability. It is intended for educational purposes only and should be used responsibly on systems you have explicit permission to test.

## Installation:

### Clone the repository:
   ```bash
   git clone https://github.com/Zyx2440/Apache-HTTP-Server-2.4.50-RCE.git
```
### Go to the dir:
   ```bash
   cd Apache-HTTP-Server-2.4.50-RCE
```
### install The Requirements:
   ```bash
   pip3 install requests~=2.27.1 termcolor~=1.1.0
   ```
### or:
```bash
   pip3 install -r add_requirements.txt
   ```
### usage: 
   ```bash
   python3 50512.py target.txt -ip <YourIp> -port <ThePort>
   the text file should contain the url of the target
```

### Example:
```bash
python3 50512.py target.txt -ip 10.0.2.15 -port 4444
```
![apache](png/py.jpg)

### check the version of Apache and run exploit:

![apache](png/RunExploit.jpg)

### Remote Code Execution (RCE):

![apache](png/passwd.jpg)
   
# What the Script Does ???
   Apache Version Check: For each URL in the provided file, it checks whether the server is running Apache version 2.4.50.

### Exploit Testing:
   If the server is vulnerable: It attempts to exploit the server by sending payloads to either trigger directory traversal attacks or       execute code remotely.
   If CGI is enabled: It tries to inject a reverse shell payload to gain remote access.

# Warning !!!!!:
   For Educational Use Only: The script is intended for educational purposes to demonstrate how vulnerabilities can be tested and             exploited. Using this script against unauthorized targets is illegal and unethical.

### additionally info:
#### Original Author: calfcrusher@inventati.org
#### Modified by: Zyx2440
Purpose of modification: Added additional error handling and optimized the payload logic adn RCE and remove cve 
File Snapshot

[4.0K] /data/pocs/6a1e77d73a220e6d731ffa48d0af01df2946d4fd ├── [5.0K] 50512.py ├── [ 34] add_requirements.txt ├── [1.3K] LICENSE ├── [4.0K] png │   ├── [142K] passwd.jpg │   ├── [ 22K] py.jpg │   └── [ 45K] RunExploit.jpg └── [1.8K] README.md 1 directory, 7 files
Shenlong Bot has cached this for you
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 →