CVE-2025-54585: @finos/git proxy GitProxy New Branch Approval Exploit Vulnerability

HIGH
Advisory Identifier: GHSA-39p2-8hq9-fwj6
CWE-285
Published
Advisory Summary

CVE-2025-54585 is a HIGH gitproxy new branch approval exploit vulnerability (CWE-285: Improper Authorization) affecting @finos/git proxy libraries in the npm ecosystem. The issue involves gitproxy new branch approval exploit. Remediation is available by upgrading affected packages to version 1.19.2.

CVE-2025-54585 at a Glance

CVE Identifier CVE-2025-54585
GHSA Identifier GHSA-39p2-8hq9-fwj6
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-285: Improper Authorization
Affected Product @finos/git proxy
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-54585

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-54585, 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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 exploit the way GitProxy handles new branch creation to bypass the approval of prior commits on the parent branch. Because it can greatly affect system integrity, we classify this as a High impact vulnerability. ### Details GitProxy checks for the `0000000000000000000000000000000000000000` hash to detect new branches. This is used to process the commit accordingly in both `getDiff.ts` and `parsePush.ts`. However, the logic can be exploited as follows: 1. Make a commit in branch `a` (could be `main`) 2. Make a new branch `b` from that commit 3. Make a new commit in `b`, then approve it/get it approved 4. Go back to `a`, and attempt to push this commit to the proxy The unapproved commit from `a` will be pushed to the remote. ### PoC To reproduce this vulnerability: 1. Clone the target repository and make an unapproved commit on a mainline branch (e.g. main): ```bash git checkout -b a origin/main echo "DEBUG=true" > config.env git add config.env git commit -m "Sensitive debug config" git push proxy a ``` 2. Without approving/getting the commit approved on branch `a`, create a new branch `b` based on it: ```bash git checkout -b b echo "feature x implemented" > feature.txt git add feature.txt git commit -m "Feature implementation" git push proxy b ``` 3. Approve/get approval for the push to branch `b`. 4. Now attempt to push the original unapproved commit from branch `a`: ```bash git checkout a git push proxy a ``` Prior to `1.19.2`, this results in unapproved commits from `a` getting pushed without any policy checks or explicit approval. From `1.19.2` onwards, this flow will allow pushing all commits to branch `b` (and explicit approval will be asked for the changes on `b` only). However, commits on branch `a` now require approval on push. If merging branch `b` into `a`, this also requires explicit approval of the (previously unapproved) commits originating from `a` to prevent loopholes. ### Impact The vulnerability impacts all users or organizations relying on GitProxy to enforce policy and prevent unapproved changes. It requires no elevated privileges beyond regular push access, and no extra user interaction. It does however, require a GitProxy administrator or designated user (`canUserApproveRejectPush`) to approve pushes to the child branch.

CVE-2025-54585 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-54585?
CVE-2025-54585 is a security vulnerability in @finos/git proxy involving GitProxy New Branch Approval Exploit under CWE-285: Improper Authorization.
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-54585?
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 CWE is associated with CVE-2025-54585?
CVE-2025-54585 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for CVE-2025-54585?
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-39p2-8hq9-fwj6",
  "modified" : "2025-07-31T11:18:46Z",
  "published" : "2025-07-30T16:40:35Z",
  "aliases" : [ "CVE-2025-54585" ],
  "summary" : "GitProxy New Branch Approval Exploit",
  "details" : "### Summary\nAn attacker can exploit the way GitProxy handles new branch creation to bypass the approval of prior commits on the parent branch.\n\nBecause it can greatly affect system integrity, we classify this as a High impact vulnerability.\n\n### Details\nGitProxy checks for the `0000000000000000000000000000000000000000` hash to detect new branches. This is used to process the commit accordingly in both `getDiff.ts` and `parsePush.ts`. However, the logic can be exploited as follows:\n\n1. Make a commit in branch `a` (could be `main`)\n2. Make a new branch `b` from that commit\n3. Make a new commit in `b`, then approve it/get it approved\n4. Go back to `a`, and attempt to push this commit to the proxy\n\nThe unapproved commit from `a` will be pushed to the remote.\n\n### PoC\nTo reproduce this vulnerability:\n\n1. Clone the target repository and make an unapproved commit on a mainline branch (e.g. main):\n\n```bash\ngit checkout -b a origin/main\necho \"DEBUG=true\" > config.env\ngit add config.env\ngit commit -m \"Sensitive debug config\"\ngit push proxy a\n```\n\n2. Without approving/getting the commit approved on branch `a`, create a new branch `b` based on it:\n\n```bash\ngit checkout -b b\necho \"feature x implemented\" > feature.txt\ngit add feature.txt\ngit commit -m \"Feature implementation\"\ngit push proxy b\n```\n\n3. Approve/get approval for the push to branch `b`.\n\n4. Now attempt to push the original unapproved commit from branch `a`:\n\n```bash\ngit checkout a\ngit push proxy a\n```\n\nPrior to `1.19.2`, this results in unapproved commits from `a` getting pushed without any policy checks or explicit approval.\n\nFrom `1.19.2` onwards, this flow will allow pushing all commits to branch `b` (and explicit approval will be asked for the changes on `b` only). However, commits on branch `a` now require approval on push. If merging branch `b` into `a`, this also requires explicit approval of the (previously unapproved) commits originating from `a` to prevent loopholes.\n\n### Impact\nThe vulnerability impacts all users or organizations relying on GitProxy to enforce policy and prevent unapproved changes. It requires no elevated privileges beyond regular push access, and no extra user interaction. It does however, require a GitProxy administrator or designated user (`canUserApproveRejectPush`) to approve pushes to the child branch.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:H/VA:N/SC:N/SI:H/SA: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-39p2-8hq9-fwj6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54585"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/finos/git-proxy/commit/a620a2f33c39c78e01783a274580bf822af3cc3a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/finos/git-proxy/commit/f99fe42082eab0970e4cd0acdc3421a527a7e531"
  }, {
    "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-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-30T16:40:35Z",
    "nvd_published_at" : "2025-07-30T21:15:26Z"
  }
}