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/saku0512/cve-2026-71557-poc
Vulnerability AnalysisExploitationPenetration TestingSupply Chain SecurityLearning & Education
GitHubsaku0512/cve-2026-71557-poc

CVE-2026-71557-poc

Local proof-of-concept for CVE-2026-71557 demonstrating path traversal in go-git filesystem reference storage, including exploit logic and vulnerable-vs-fixed version comparison.

View Repository
353 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.

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    556
  • 3

    redforge

    cybersecurity91/redforge

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

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

    343
  • 5

    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.

    336
  • 6

    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.

    291

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-71557: go-git Reference Name Path Traversal PoC

日本語版はこちら

Description

This repository contains a safe local proof of concept for CVE-2026-71557, based on go-git's public advisory GHSA-qgq7-7hm3-q39j.

Before the fix, storage/filesystem used a loose-reference name as the path .git/<reference-name> without sufficient validation. A name such as refs/heads/../../config is normalized outside the intended reference subtree and can overwrite .git/config.

This PoC calls the real go-git API and targets only a dummy .git/config created under a temporary directory. It does not contact a Git server, modify an existing repository, or execute arbitrary commands.

Disclaimer

This project is intended only for education and authorized ethical security testing. Do not use it against systems or environments without permission.

Vulnerability Details

  • CVE ID: CVE-2026-71557
  • GitHub Advisory: GHSA-qgq7-7hm3-q39j
  • Type: Path Traversal (CWE-22)
  • Severity: Medium
  • CVSS v3.1: 6.3 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L)
  • Affected versions:
    • github.com/go-git/go-git/v5 <= 5.19.1
    • github.com/go-git/go-git/v6 <= 6.0.0-alpha.4
  • Patched versions:
    • v5: 5.19.2
    • v6: 6.0.0-alpha.5
  • Affected storage: the dotgit reference storage in storage/filesystem
  • Unaffected storage: storage/memory

Root Cause

In v5.19.1, DotGit.SetRef passed the reference name directly to setRef as a file name:

fileName := r.Name().String()
return d.setRef(fileName, content, old)

The root of filesystem-backed storage is normally .git. The reference name refs/heads/../../config normalizes to config, turning a reference update into a write to .git/config. A malicious Git server can advertise such a name, and traversal may remain after clone/fetch refspec mapping, allowing the attacker-controlled name to reach this storage path.

The patched implementation validates names at filesystem storage entry points, including SetRef, Ref, and RemoveRef, and rejects names that can escape the reference storage.

Proof of Concept

Requirements

  • Go 1.25 or later, or a Go installation with automatic toolchain download
  • Network access for the initial module download

Reproduce with the vulnerable version

The included go.mod pins vulnerable go-git v5.19.1.

go run .

Expected key output:

[*] go-git version: v5.19.1
[*] crafted reference: refs/heads/../../config
[*] SetReference error: <nil>
[!] VULNERABLE: .git/config was overwritten through the reference name.

The PoC:

  1. Creates filesystem-backed Git storage under an OS temporary directory.
  2. Writes a harmless marker to .git/config.
  3. Passes the hash reference refs/heads/../../config to SetReference.
  4. Verifies that the reference hash replaced the marker.
  5. Removes the temporary directory automatically.

Compare vulnerable and patched versions

The matrix script runs the same PoC against v5.19.1 and v5.19.2 in temporary modules without changing this repository's go.mod.

./scripts/run-version-matrix.sh

Expected classifications:

go-git v5.19.1
[!] VULNERABLE: .git/config was overwritten through the reference name.

go-git v5.19.2
[+] FIXED: the crafted reference was rejected and .git/config stayed intact.

Use -keep if you want to inspect the generated files. The displayed directory is not automatically removed in that mode and must be deleted manually after inspection.

go run . -keep

Scope

This PoC directly exercises the vulnerable filesystem-storage entry point described by the advisory and demonstrates metadata overwrite through path traversal. It does not implement a malicious Git protocol server or the clone/fetch transport path.

Remediation

Upgrade v5 users to v5.19.2 or later and v6 alpha users to v6.0.0-alpha.5 or later. Until an upgrade is possible, do not clone from or fetch from untrusted Git servers with filesystem-backed storage. Applications using only storage/memory are not affected.

References

  • GHSA-qgq7-7hm3-q39j
  • go-git PR #2247 (v6 fix)
  • go-git PR #2254 (v5 backport)
  • v5 fix commit f3d0cc1
  • v5 additional safety commit 3b306ef
Download Tool