Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker deploys malicious HTTP git server
-
DeliveryCrafts .git/HEAD with path traversal ref payload
-
ExploitVictim invokes GitHacker against attacker URL
-
ExecutionTool reads local sensitive file via traversal
-
Persist40-char hex substrings trigger outbound GET requests
-
ImpactAttacker 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 |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
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).
Primary rating from Vendor (https://github.com/WangYihang/GitHacker).
CVSS VectorVendor: https://github.com/WangYihang/GitHacker
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_tasksreads the downloaded.git/HEAD, parsesref: <ref-path>, and joins the raw ref-path ontotemp_dst/.git/logs/before reading the resulting file.add_hashes_parsedscans any file it reads for 40-character hex substrings and emitsGET .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/passwdcaused 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:
add_folderanchors every derived path onself.url + '.git/', so the first path component after theurl_lengthstrip is always.git.os.path.join's absolute-path short-circuit never fires.- Python's
str.replace("..", "")is greedy non-overlapping;....//collapses to//,......//to///, etc. No literal..survives intoadd_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_folderswitches tourlparse-based scheme + netloc + path comparison.construct_url_from_path_componentspercent-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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-78777
GHSA-hr3m-4qwq-3mgc
NVD
CVE.org
EPSS
Exploit-DB