GitProxy Hidden Commits Injection
Date: 2025-07
Affected: npm/@finos/git-proxy
Attack vector: data-exfiltration
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2025-54584
CVE-2025-54586
CWE: CWE-115
CWE-200
CVSS: 7.1 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N)

### Summary An attacker can inject extra commits into the pack sent to GitHub, commits that aren’t pointed to by any branch. Although these “hidden” commits never show up in the repository’s visible history, GitHub still serves them at their direct commit URLs. This lets an attacker exfiltrate sensitive data without ever leaving a trace in the branch view. We rate this a High‑impact vulnerability because it completely compromises repository confidentiality. ### Details The proxy currently trusts only the ref‑update line (`oldOid → newOid`) and doesn't inspect the packfile’s contents Because the code only runs `git rev-list oldOid..newOid` to compute **introducedCommits** but **never** checks which commits actually arrived in the pack, a malicious client can append extra commits. Those “hidden” commits won’t be pointed to by any branch but GitHub still stores and serves them by SHA. <img width="2556" height="744" alt="Screenshot 2025-07-16 at 12 29 19" src="https://github.com/user-attachments/assets/abf459a9-310b-4819-a989-797c7e871790" /> ### PoC #### Prerequisites - A GitHub Personal Access Token stored in `~/.github-test-pat`. - A test repository also registered in git-proxy, e.g. `your-org/test-repo.git`, to which you have push rights. #### 1. Prepare the “visible” and “hidden” commits ```bash # Clone the test repository git clone http://localhost:8000/your-org/test-repo.git cd test-repo # 1. Record the original HEAD ORIG_COMMIT=$(git rev-parse HEAD) # 2. Cr


Mitigations:

Architectural layers (MAESTRO):