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
Exploit created in python3 to exploit known vulnerabilities in Apache web server (CVE-2021-41773, CVE-2021-42013)
Readme
# Apache-CVEs
Exploit created in python3 to exploit known vulnerabilities in Apache web server (CVE-2021-41773, CVE-2021-42013)

## What's apache

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

## Version Affected

- CVE-2021-41773 -> 2.4.49
- CVE-2021-42013 -> 2.4.50

# How to install

Just do a git clone:

```
git clone https://github.com/0xGabe/Apache-CVEs
```

# CVE-2021-41773

## How to use

### Path traversal

To read the desired file, just pass the file path, if the user does not have permission to read, there will be no reading result.

```
python3 cve-2021-41773.py --url http://HOST:PORT --path /etc/passwd
```

### Remote Command Execution

To execute commands with spaces, special characters or the like on the target machine, it is necessary to pass the command in quotes.

```
python3 cve-2021-41773.py --url http://HOST:PORT --cmd id
```

# CVE-2021-42013

## How to use

### Path traversal

To read the desired file, just pass the file path, if the user does not have permission to read, there will be no reading result.

```
python3 cve-2021-42013.py --url http://HOST:PORT --path /etc/passwd
```

### Remote Command Execution

To execute commands with spaces, special characters or the like on the target machine, it is necessary to pass the command in quotes.

```
python3 cve-2021-42013.py --url http://HOST:PORT --cmd id
```




File Snapshot

[4.0K] /data/pocs/5cd6cf06ded9bc83e6d14d832bf866d1ea2e6005 ├── [2.6K] cve-2021-41773.py ├── [2.6K] cve-2021-42013.py ├── [1.0K] LICENSE └── [1.6K] README.md 0 directories, 4 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 →