Skip to main content

GitHacker CVE-2026-50024

| EUVDEUVD-2026-78777 MEDIUM
Path Traversal (CWE-22)
2026-09-09 https://github.com/WangYihang/GitHacker GHSA-hr3m-4qwq-3mgc PYSEC-2026-3835
5.3
CVSS 3.1 · Vendor: https://github.com/WangYihang/GitHacker
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker deploys malicious HTTP git server
  2. Delivery
    Crafts .git/HEAD with path traversal ref payload
  3. Exploit
    Victim invokes GitHacker against attacker URL
  4. Execution
    Tool reads local sensitive file via traversal
  5. Persist
    40-char hex substrings trigger outbound GET requests
  6. Impact
    Attacker logs capture hex-fragment exfiltration

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The victim must actively invoke GitHacker (versions ≤1.1.7) targeting a URL fully controlled by the attacker - no passive or autonomous network exploitation is possible. The attacker must operate a web server that responds correctly to GitHacker's HTTP probes and serves a crafted .git/HEAD with a traversal ref path. Hex-fragment exfiltration is additionally gated on the target file containing 40-character hexadecimal substrings; files without such sequences yield only an existence oracle, not content. No write-side primitive was confirmed: empirical testing of 25 traversal payloads against the 1.1.7 sdist yielded zero out-of-tree write escapes. GitHacker must be running outside a container with filesystem access to sensitive paths for impact to extend beyond the tool's working directory.

Impact

The provided CVSS 5.3 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N) contains a notable inconsistency: the advisory explicitly states that exploitation requires the victim to actively run GitHacker against an attacker-controlled URL, which corresponds to UI:R rather than UI:N. Real-world risk is further bounded by the limited egress channel - file contents are not streamed wholesale; only 40-character hex substrings trigger outbound requests, so meaningful exfiltration is limited to files containing cryptographic material (password hashes, pack SHA1s, HMAC outputs, some session tokens). No EPSS data is included in the intelligence bundle. No CISA KEV listing exists, and no public exploit code has been identified. The affected population is almost exclusively security researchers and penetration testers, most of whom follow the project's own guidance to run the tool inside a disposable container - which the advisory explicitly recommends as a workaround. No public exploit identified at time of analysis. CVSS indicates UI:N but description clearly requires victim action - verify with vendor whether the NVD submission captures this correctly.

Exploit ScenarioDerived

An attacker configures a web server to respond to GitHacker's HTTP probes and serves a crafted .git/HEAD file containing ref: ../../../../../../etc/shadow. When a penetration tester runs GitHacker against the attacker's URL, add_head_file_tasks traverses out of temp_dst and reads /etc/shadow; add_hashes_parsed then emits an outbound GET for each 40-character hex substring found - Unix SHA-512 fragment sequences - which appear in the attacker's server logs, enabling reconstruction of partial hash material. No public POC repository was identified in the provided intelligence.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 09, 2026

Path traversal in GitHacker ≤1.1.7 allows a malicious git server to coerce the tool into reading arbitrary files from the victim's local filesystem via an unsanitized ref: value in a crafted .git/HEAD. The exploitable primitive is narrower than full arbitrary file-read: the recovery loop converts every 40-character hex substring in any accessed file into an outbound HTTP GET back to the attacker's server, yielding an existence oracle for arbitrary paths and hex-fragment exfiltration for files containing cryptographic material such as password hashes, HMAC-SHA1 outputs, or SSH key fingerprints. Exploitation requires the victim to actively run GitHacker against an attacker-controlled URL; no public exploit code has been identified at time of analysis, and a vendor-released patch is available as version 1.1.8.

RemediationAI

Upgrade to GitHacker 1.1.8 (patch commit 5f2a8ba: https://github.com/WangYihang/GitHacker/commit/5f2a8ba), which introduces a path-segment allowlist validated at queue-time and removes the previous brittle replace('..','') filter. As an interim workaround, run GitHacker exclusively inside a disposable container (Docker or similar) - this confines any traversal to the container's filesystem and prevents access to sensitive host paths; the trade-off is added setup overhead per engagement. Additionally, never point GitHacker at any URL whose content is not under direct operator control. Regression tests covering the PoC and six bypass variants are available in tests/test_ref_validation.py (commit 16fcd81: https://github.com/WangYihang/GitHacker/blob/main/tests/test_ref_validation.py). Full advisory: https://github.com/WangYihang/GitHacker/security/advisories/GHSA-hr3m-4qwq-3mgc.

Affected VersionsENISA

GitHacker < 1.1.8

Affected Packages

pypi githacker fix: 1.1.8

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GitHacker (pip package githacker) is a Python forensic tool that reconstructs exposed .git/ repositories by iteratively fetching objects over HTTP into a local temp_dst directory. Its add_head_file_tasks function parsed the ref: field from a server-supplied .git/HEAD and joined the raw path segments directly onto temp_dst/.git/logs/ via os.path.join without any segment validation, making it vulnerable to CWE-22 (path traversal). A companion function, add_hashes_parsed, scanned every file accessed by the tool for 40-character hex substrings and emitted one HTTP GET per match back to the attacker's server, forming an unintended covert exfiltration channel. The fix in commit 5f2a8ba introduces _is_safe_path_segment, a regex-based allowlist (^[A-Za-z0-9._\-+@]+\Z) applied at queue-time to every segment before it is joined onto temp_dst; adjacent surfaces are also hardened with strict same-origin URL descent checks and percent-encoding of outgoing segments. The brittle str.replace('..', '') filter that previously guarded add_task is removed.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/WangYihang/GitHacker) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
vuln.today AI 4.3 MEDIUM

Victim must actively run GitHacker against the attacker's URL (UI:R); exfiltration is hex-fragment-limited, no write primitive confirmed (C:L, I:N, A:N).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/WangYihang/GitHacker).

CVSS VectorVendor: https://github.com/WangYihang/GitHacker

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

DescriptionCVE.org

Summary

GitHacker through 1.1.7 did not validate path segments parsed from attacker-controlled .git/HEAD before joining them onto its output directory. A malicious server could coerce GitHacker into reading arbitrary local files. Contents do not stream back wholesale, but the recovery loop turns any 40-character hex substring into an outbound HTTP GET - an existence oracle for arbitrary paths plus hex-fragment exfiltration of file contents.

Details

Vulnerability

GitHacker rebuilds a remote .git/ by fetching files into temp_dst. Two functions derived filesystem paths from server-controlled content:

  • add_head_file_tasks reads the downloaded .git/HEAD, parses ref: <ref-path>, and joins the raw ref-path onto temp_dst/.git/logs/ before reading the resulting file.
  • add_hashes_parsed scans any file it reads for 40-character hex substrings and emits GET .git/objects/<sha[0:2]>/<sha[2:]> for each one - onto the attacker's server and into the local output tree.

Pre-fix, add_head_file_tasks did not validate the ref segments. A malicious .git/HEAD of

ref: ../../../../../../etc/passwd

caused add_head_file_tasks to traverse out of temp_dst and read /etc/passwd. The bytes flowed into add_hashes_parsed, which emitted one outbound HTTP request per 40-char-hex match - observable on the attacker's logs.

Impact

PR #65 originally classified this as arbitrary local file read. Joint analysis during coordinated disclosure narrowed the primitive: file contents do not stream back wholesale because the only egress channel is the 40-char-hex regex. In practice an attacker can:

  • Existence oracle for any path on the GitHacker host (/etc/shadow, /root/.ssh/id_rsa, /home/<user>/.git-credentials, build artifacts under /tmp/).
  • Hex-fragment exfiltration when the targeted file contains 40-char hex sequences: other git repos' refs / pack filenames, password hashes, HMAC-SHA1 outputs, some session tokens.

Not exploitable without victim action: the attacker must persuade the victim to run GitHacker against a URL they control. Project guidance has always been to run GitHacker inside a disposable container.

Scoping note: no write-side primitive in 1.1.7

A working write-side primitive (attacker drops content outside temp_dst via add_folder / add_task) does not reproduce against the shipped 1.1.7 source. Empirical testing by the reporter against GitHacker-1.1.7.tar.gz (25 traversal-style payloads including ....//, %2e%2e%2f, layered foo/../../, NUL bytes, backslash variants, absolute paths) yielded 0/25 escapes. Two structural reasons:

  1. add_folder anchors every derived path on self.url + '.git/', so the first path component after the url_length strip is always .git. os.path.join's absolute-path short-circuit never fires.
  2. Python's str.replace("..", "") is greedy non-overlapping; ....// collapses to //, ......// to ///, etc. No literal .. survives into add_task.

5f2a8ba is still the correct fix for the read-side primitive and additionally hardens add_task as defense in depth against future regressions - for example, if a later caller removes the .git/ anchor in add_folder or wires a new server-controlled segment source into add_task.

Fix

Commit 5f2a8ba introduces _is_safe_path_segment as a single trust boundary: every segment about to be joined onto temp_dst or appended to an outgoing URL is validated against an allowlist before add_task accepts it. Empty / . / .. / separators / NUL / control characters are rejected; the brittle replace("..", "") filter is removed.

The fix also tightens adjacent surfaces preemptively:

  • add_folder switches to urlparse-based scheme + netloc + path comparison.
  • construct_url_from_path_components percent-encodes every segment.

PR #65's two-layer defense (allowlist regex + os.path.realpath() confinement) was consolidated onto the allowlist applied at queue-time, removing the TOCTOU window an after-the-fact realpath() check leaves open and the per-call-site drift risk. PR #65 was closed in favour of the broader fix.

Regression tests in tests/test_ref_validation.py (commit 16fcd81) pin the PoC and six bypass variants (extra-depth, mid-path, NUL, absolute path, leading-dot, .lock-suffix).

Credit

Reported and patched-prototyped by Zac Wang (@7a6163) in #65. Zac refined the impact framing from "arbitrary file read" to "existence oracle + hex-fragment exfiltration" and verified the absence of a write-side primitive against the shipped 1.1.7 sdist with a 25-payload harness.

Patches

Patched in 1.1.8 (commit 5f2a8ba; tests 16fcd81).

Workarounds

Run GitHacker inside a disposable container. Do not point GitHacker at any URL whose contents are not under your control.

Resources

  • https://github.com/WangYihang/GitHacker/pull/65
  • https://github.com/WangYihang/GitHacker/commit/5f2a8ba
  • https://github.com/WangYihang/GitHacker/blob/main/tests/test_ref_validation.py
  • https://githacker.pages.dev/security
  • https://github.com/justinsteven/advisories
  • https://drivertom.blogspot.com/2021/08/git.html

Threat Intelligence Overview

EPSS Score
0.4%
Top 62% exploitable
Prevalence
Low
niche penetration-testing tool, minimal enterprise production footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy