# CVE-2026-50024: GitHacker: Path traversal in ref/hash parsing enables existence oracle and hex-fragment exfiltration via malicious .git server

> A malicious Git server can exploit path traversal in GitHacker to read local files and leak hexadecimal fragments via an existence oracle.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Sep 2026
- **Updated:** 16 Sep 2026
- **Also known as:** GHSA-hr3m-4qwq-3mgc, PYSEC-2026-3835

## What is CVE-2026-50024?

CVE-2026-50024 is a medium-severity path traversal vulnerability in WangYihang GitHacker, published on 15 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

GitHacker is a tool that restores Git repositories from exposed .git directories. In 1.1.7 and earlier, add_head_file_tasks parses an attacker-controlled ref path from .git/HEAD and joins unvalidated path segments onto temp_dst/.git/logs/, allowing a malicious server to make GitHacker read an arbitrary local file when a victim runs the tool against the server's URL. add_hashes_parsed then scans the file for 40-character hexadecimal substrings and requests each match through .git/objects using the first two characters and remaining characters as path components, creating an attacker-observable existence oracle and disclosing matching hexadecimal fragments. Complete file contents are not returned, and the add_folder and add_task write path in shipped version 1.1.7 does not permit an escape. This issue is fixed in repository version 1.1.9.

Weakness: CWE-23 (Relative Path Traversal), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-50024?

3 open source packages ship an affected version, including githacker.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `githacker` | PyPI | All versions | 1.1.8 |
| `githacker` | PyPI | All versions | 1.1.8 |
| `githacker` | PyPI | All versions | 1.1.8 |

## How do I fix CVE-2026-50024?

Upgrade githacker to 1.1.8 or later.

## Is CVE-2026-50024 being exploited?

There is no known exploitation of CVE-2026-50024 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-50024 and fix it if it is affected.

What it is: CVE-2026-50024 is a medium-severity path traversal vulnerability in WangYihang GitHacker, published on 15 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-50024 in the wild and no public exploit code.

Affected packages and fixed versions:
- githacker (PyPI): affected all versions; fixed in 1.1.8
- githacker (PyPI): affected all versions; fixed in 1.1.8
- githacker (PyPI): affected all versions; fixed in 1.1.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-50024/ (Markdown: https://insights.sbomify.com/CVE-2026-50024/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-50024
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-50024
- OSV: https://osv.dev/vulnerability/CVE-2026-50024

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-50024/
Summaries are generated and may contain mistakes; the official description above is the record.
