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

## Usage

```bash
docker-compose up --build vuln-server-no-cgid
python no-cgid/exploit.py
```

```bash
docker-compose up --build vuln-server-cgid-sh
python cgid-sh/exploit.py
```

## CVE-2021-41773とは?
[CVE-2021-41773](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41773)

Apache HTTP Server 2.4.49のディレクトリトラバーサルの脆弱性。Require all deniedが設定されていない場合に発生する。

%2eでエンコードされたURLを受け取った時に、上位ディレクトリへのアクセスを許してしまう。
例: GET /cgi-bin/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd

CGIが有効な場合はRCE可。

この脆弱性への対応が不十分だったことによるApache HTTP Server 2.4.50の脆弱性[CVE-2021-42013](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42013)が存在する。
File Snapshot

[4.0K] /data/pocs/51774f2d7325bf8e5a780958f49d8bdcfcf4b095 ├── [4.0K] cgid-sh │   ├── [ 70] Dockerfile │   ├── [ 745] exploit.py │   └── [ 20K] httpd.conf ├── [4.0K] cgid-write │   ├── [ 106] Dockerfile │   ├── [ 902] exploit.py │   ├── [ 20K] httpd.conf │   └── [4.0K] payload │   └── [ 154] index.html ├── [ 428] docker-compose.yml ├── [4.0K] no-cgid │   ├── [ 70] Dockerfile │   ├── [ 681] exploit.py │   └── [ 20K] httpd.conf └── [ 873] README.md 4 directories, 12 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 →