Miggo Logo

CVE-2025-54586: GitProxy Hidden Commits Injection

7.1

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
7/30/2025
Updated
7/30/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@finos/git-proxynpm<= 1.19.11.19.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability, 'GitProxy Hidden Commits Injection', allows an attacker to inject commits into a repository that are not referenced by any branch, making them hidden from the normal git history. This is possible because the git-proxy was not verifying that the commits contained within the pushed packfile matched the commits that were supposed to be pushed according to the git ref-update information.

The analysis of the patches reveals that the vulnerability is addressed by introducing a new validation step, checkHiddenCommits, into the push processing chain. The functions that were active in the processing chain before this new validation step, and were responsible for handling the user's push data, are the ones considered vulnerable.

Two main functions have been identified:

  1. parsePush.exec: This function is the entry point for parsing the push request. Its original implementation was too simplistic and did not correctly parse and prepare the data for the necessary validation. It was a key enabler of the vulnerability because it didn't set up the necessary checks.

  2. writePack.exec: This function takes the user-provided packfile and writes it to the repository using git receive-pack. This is the function that directly processes the malicious data containing the hidden commits. Before the patch, it did so without any verification.

During an exploit, both of these functions would be called. parsePush.exec would first parse the malicious request, and then writePack.exec would write the malicious packfile to disk. The vulnerability is the absence of a check between these two steps. Therefore, both are critical runtime indicators for this vulnerability.

Vulnerable functions

parsePush.exec
src/proxy/processors/push-action/parsePush.ts
This function is responsible for the initial parsing of a git push request. The original implementation was insufficient and implicitly trusted the client-provided ref-update information without a thorough validation of the accompanying packfile. This lack of validation is the root cause of the vulnerability, as it allowed an attacker to inject hidden commits. The function was processing user-controlled data without proper verification, making it a key part of the exploitation process.
writePack.exec
src/proxy/processors/push-action/writePack.ts
This function is responsible for writing the received packfile to the git repository using the `git receive-pack` command. Before the patch, this function would write any packfile provided by the user without any verification of its contents against the declared ref updates. This allowed an attacker to inject malicious, hidden commits. The patch modifies this function to record the index files generated from the packfile, which are then used by the new `checkHiddenCommits` processor to perform the necessary validation. This function would be present in any runtime profile of an exploit, as it directly handles the malicious data.

WAF Protection Rules

WAF Rule

### Summ*ry *n *tt**k*r **n inj**t *xtr* *ommits into t** p**k s*nt to *it*u*, *ommits t**t *r*n’t point** to *y *ny *r*n**. *lt*ou** t**s* “*i***n” *ommits n*v*r s*ow up in t** r*pository’s visi*l* *istory, *it*u* still s*rv*s t**m *t t**ir *ir**t *

Reasoning

T** vuln*r**ility, '*itProxy *i***n *ommits Inj**tion', *llows *n *tt**k*r to inj**t *ommits into * r*pository t**t *r* not r***r*n*** *y *ny *r*n**, m*kin* t**m *i***n *rom t** norm*l *it *istory. T*is is possi*l* ****us* t** *it-proxy w*s not v*ri*