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
A PoC exploit for CVE-2021-42013 - Apache 2.4.49 & 2.4.50 Remote Code Execution
Readme
# 🚨 CVE-2021-42013 - Apache 2.4.49 & 2.4.50 Remote Code Execution 🚨

CVE-2021-42013 builds upon the previously identified vulnerability, CVE-2021-41773. Despite the Apache team's efforts to address CVE-2021-41773 in version 2.4.50, subsequent investigations revealed that the fix fell short of fully mitigating the security risk.
This vulnerability exploits a path traversal attack vector, allowing attackers to manipulate URLs, mapping them to files outside the intended directories configured by Alias-like directives. When these files lack proper protection, such as the "require all denied" configuration, attackers can exploit this vulnerability by executing commands from the vulnerable path.
# Exploitation and Impact 💥

The severity of this vulnerability escalates if CGI scripts are enabled for the aliased paths. Exploiting CVE-2021-42013 grants attackers the ability to remotely execute arbitrary code on the targeted server, potentially leading to a complete system compromise as seen below. 

![Alt Text](https://github.com/K3ysTr0K3R/CVE-2021-42013-EXPLOIT/blob/main/Screenshot_2024-01-15_08-14-03.png)

It is crucial to act promptly by upgrading to secure versions of Apache HTTP Server.
# Mitigation 🛠️

Effectively countering the risks posed by CVE-2021-42013 requires upgrading to a version beyond Apache HTTP Server 2.4.50. Regularly monitoring security advisories and promptly applying updates are fundamental practices for upholding web server security.
# Educational Disclaimer 📚

The Proof of Concept (PoC) exploit provided in this repository is for educational purposes only. It is intended to enhance understanding and awareness of the CVE-2021-42013 vulnerability. Any use of the PoC exploit for malicious intent is strictly prohibited. The repository and its contributors disclaim any responsibility for misuse or any consequences arising from unauthorized activities.
File Snapshot

[4.0K] /data/pocs/0611f83fd0c58e77f7138f653035624227a8a06d ├── [6.8K] CVE-2021-42013.py ├── [1.9K] README.md └── [ 91K] Screenshot_2024-01-15_08-14-03.png 0 directories, 3 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 →