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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-42013 PoC — Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete fix of CVE-2021-41773)

Source
Associated Vulnerability
Title:Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete fix of CVE-2021-41773) (CVE-2021-42013)
Description:It was found that the fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient. 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 only affects Apache 2.4.49 and Apache 2.4.50 and not earlier versions.
Description
CVE-2021-42013 Vulnerability Scanner  This Python script checks for the Remote Code Execution (RCE) vulnerability (CVE-2021-42013) in Apache 2.4.50. 
Readme
# CVE-2021-42013 Vulnerability Scanner

This Python script checks for the Remote Code Execution (RCE) vulnerability (CVE-2021-42013) in Apache 2.4.50.

## Introduction

This script is designed to help identify if a server is vulnerable to the CVE-2021-42013 RCE vulnerability in Apache 2.4.50. It checks the server's response headers to determine if the vulnerability exists and exploits it for educational purposes.

## Prerequisites

- Python 3.x (Written on Python3.12)
- Internet connectivity

## Usage

1. Clone the repository or download the `cve-2021-42013.py` script.
2. Run the script using Python:

    ```bash
    python cve-2021-42013.py -u <URL>
    ```

    Replace `<URL>` with the URL of the server you want to scan.

3. Follow the prompts to enter a command to execute on the vulnerable server.
4. Review the script's output for results.

![CVE-2021-42013_DEMO](https://github.com/BassoNicolas/CVE-2021-42013/assets/70383324/12bc62b6-04b7-4a4e-be23-3a156104dfbb)

## Options

- `-u, --url`: Specify the URL of the server to scan for the CVE-2021-42013 vulnerability.

## Disclaimer

This script is provided for educational and research purposes only. Use it responsibly and do not use it on servers without proper authorization.

## License

lol

## Contributions

Contributions are welcome! If you meet any issue regarding the script, you can either contact me on LinkedIn or open an issue :)
File Snapshot

[4.0K] /data/pocs/54dccd17142bcf73313016fac471162c41d4334c ├── [5.3K] CVE-2021-42013.py └── [1.4K] README.md 0 directories, 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 →