Cloudanix VulnDB

CVE-2025-21613

None

go-git has an Argument Injection via the URL field

CVSS

—

EPSS

1.3%

Published

Jan 6, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A library used by many programs to work with Git repositories has a flaw that lets attackers slip in extra commands when certain local file access methods are used, which could let them interfere with or misuse those repositories on unpatched systems.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Remote Code Execution
Component
Library
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Argument injection into git-upload-pack flags via the file transport protocol, which causes go-git to shell out to the git binary with attacker-controlled arguments.

Why it matters to the business

Environments that clone or interact with repositories over the file:// protocol using vulnerable go-git versions risk unauthorized manipulation of Git operations, potentially leading to data exfiltration, repository tampering, or execution of unintended Git commands; the low EPSS and lack of KEV status indicate limited observed exploitation but still require prompt attention due to the 643 days since publication.

How an attack unfolds

An attacker supplies a crafted repository URL or path that uses the file transport; go-git invokes the git binary with the supplied arguments, allowing arbitrary flags to be passed to git-upload-pack without proper sanitization.

How to fix it

Upgrade go-git/go-git to the fixed commit 94bd4af1deb15a64e90c6287eaf9e9f09b192a1f (equivalent to v5.13 or later). Where upgrades are not immediately feasible, disable or avoid use of the file transport protocol entirely.

How to confirm the fix worked

Verify the go-git dependency version resolves to commit 94bd4af1deb15a64e90c6287eaf9e9f09b192a1f or newer; test that file:// URLs no longer permit injection of arbitrary git-upload-pack flags.

Typical attack path

  1. Locate applications or dependencies that import go-git and perform Git operations
  2. Identify code paths that accept or construct repository URLs using the file:// protocol
  3. Craft a malicious URL or path containing injected git-upload-pack flags
  4. Trigger the vulnerable code path to cause the shell-out with attacker-controlled arguments
  5. Observe or leverage the resulting Git command behavior for further impact

How to detect it

Review application logs and process execution traces for invocations of git-upload-pack with unexpected or attacker-supplied flags originating from go-git file transport handling; correlate with repository URL inputs containing file://.

What your security team should do

  • Immediately audit all codebases and dependencies for use of go-git with file transport
  • Prioritize upgrade to the fixed commit across all affected packages
  • Implement input validation or protocol whitelisting to block file:// usage until patched
  • Monitor EPSS trend and reassess if exploitation maturity increases

The record

An argument injection vulnerability was discovered in `go-git` versions prior to `v5.13`. Successful exploitation of this vulnerability could allow an attacker to set arbitrary values to [git-upload-pack flags](https://git-scm.com/docs/git-upload-pack). This only happens when the `file` transport protocol is being used, as that is the only protocol that shells out to `git` binaries.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/go-git/go-git/v4 4.0.0 No fix
Go github.com/go-git/go-git/v5 0 5.13.0
Go gopkg.in/src-d/go-git.v4 4.0.0 No fix
AlmaLinux:8 grafana 0 9.2.10-21.el8_10
AlmaLinux:8 grafana-selinux 0 9.2.10-21.el8_10
Chainguard amazon-ssm-agent 0 3.3.1957.0-r5
Chainguard amazon-ssm-agent-ecs-exec 0 3.3.1957.0-r5
Chainguard apko 0 0.22.5-r0
Chainguard argo-cd-2.10 0 2.10.18-r4
Chainguard argo-cd-2.10-compat 0 2.10.18-r4
Chainguard argo-cd-2.10-repo-server 0 2.10.18-r4
Chainguard argo-cd-2.11 0 2.11.12-r3
Chainguard argo-cd-2.11-compat 0 2.11.12-r3
Chainguard argo-cd-2.11-repo-server 0 2.11.12-r3
Chainguard argo-cd-2.12 0 2.12.9-r1
Chainguard argo-cd-2.12-compat 0 2.12.9-r1
Chainguard argo-cd-2.12-repo-server 0 2.12.9-r1
Chainguard argo-cd-2.13 0 2.13.3-r1
Chainguard argo-cd-2.13-compat 0 2.13.3-r1
Chainguard argo-cd-2.13-repo-server 0 2.13.3-r1
Chainguard argo-cd-fips-2.10 0 2.10.18-r4
Chainguard argo-cd-fips-2.10-compat 0 2.10.18-r4
Chainguard argo-cd-fips-2.10-repo-server 0 2.10.18-r4
Chainguard argo-cd-fips-2.11 0 2.11.12-r3
Chainguard argo-cd-fips-2.11-compat 0 2.11.12-r3
Chainguard argo-cd-fips-2.11-repo-server 0 2.11.12-r3
Chainguard argo-cd-fips-2.12 0 2.12.9-r1
Chainguard argo-cd-fips-2.12-compat 0 2.12.9-r1
Chainguard argo-cd-fips-2.12-repo-server 0 2.12.9-r1
Chainguard argo-cd-fips-2.13 0 2.13.3-r1
Chainguard argo-cd-fips-2.13-compat 0 2.13.3-r1
Chainguard argo-cd-fips-2.13-repo-server 0 2.13.3-r1
Chainguard argo-events 0 1.9.3-r3
Chainguard argo-events-compat 0 1.9.3-r3
Chainguard argo-events-fips 0 1.9.3-r3
Chainguard argo-events-fips-compat 0 1.9.3-r3
Chainguard argo-workflow-cli 0 3.6.2-r4
Chainguard argo-workflow-cli-fips 0 3.6.2-r3
Chainguard argo-workflow-controller 0 3.6.2-r4
Chainguard argo-workflow-controller-compat 0 3.6.2-r4
Chainguard argo-workflow-controller-compat-fips 0 3.6.2-r3
Chainguard argo-workflow-controller-fips 0 3.6.2-r3
Chainguard argo-workflow-executor 0 3.6.2-r4
Chainguard argo-workflow-executor-compat 0 3.6.2-r4
Chainguard argo-workflow-executor-compat-fips 0 3.6.2-r3
Chainguard argo-workflow-executor-fips 0 3.6.2-r3
Chainguard argo-workflows 0 3.6.2-r4
Chainguard argo-workflows-fips 0 3.6.2-r3
Chainguard argo-workflows-known-hosts 0 3.6.2-r4
Chainguard argo-workflows-known-hosts-fips 0 3.6.2-r3
Chainguard argo-workflows-ui 0 3.6.2-r4
Chainguard argocd-image-updater 0 0.15.2-r1
Chainguard argocd-image-updater-compat 0 0.15.2-r1
Chainguard argocd-image-updater-fips 0 0.15.2-r0
Chainguard bom 0 0.6.0-r14
Chainguard chainctl 0 0.2.20-r0
Chainguard chezmoi 0 2.57.0-r1
Chainguard crossplane 0 1.18.2-r2
Chainguard crossplane-crank 0 1.18.2-r2
Chainguard crossplane-crank-fips 0 1.18.2-r2
Chainguard crossplane-fips 0 1.18.2-r2
Chainguard crossplane-xfn 0 1.18.2-r2
Chainguard dagger 0 0.15.1-r3
Chainguard datadog-agent 0 7.60.1-r1
Chainguard datadog-agent-core-integrations 0 7.60.1-r1
Chainguard datadog-agent-core-integrations-fips 0 7.60.1-r1
Chainguard datadog-agent-fakeintake 0 7.60.1-r1
Chainguard datadog-agent-fakeintake-fips 0 7.60.1-r1
Chainguard datadog-agent-fips 0 7.60.1-r1
Chainguard datadog-agent-jmx 0 7.60.1-r1
Chainguard datadog-agent-jmx-fips 0 7.60.1-r1
Chainguard datadog-agent-oci-compat 0 7.60.1-r1
Chainguard datadog-agent-oci-compat-fips 0 7.60.1-r1
Chainguard datadog-agent-s6-overlay 0 7.60.1-r1
Chainguard datadog-agent-s6-overlay-fips 0 7.60.1-r1
Chainguard datadog-cluster-agent 0 7.60.1-r1
Chainguard datadog-cluster-agent-fips 0 7.60.1-r1
Chainguard datadog-cluster-agent-oci-compat 0 7.60.1-r1
Chainguard datadog-cluster-agent-oci-compat-fips 0 7.60.1-r1
Chainguard docker-credential-cgr 0 0.2.20-r0
Chainguard dogstatsd 0 7.60.1-r1
Chainguard flux 0 2.4.0-r3
Chainguard flux-2.4 0 2.4.0-r3
Chainguard flux-2.4-compat 0 2.4.0-r3
Chainguard flux-compat 0 2.4.0-r3
Chainguard flux-fips 0 2.4.0-r3
Chainguard flux-fips-2.4 0 2.4.0-r3
Chainguard flux-fips-2.4-compat 0 2.4.0-r3
Chainguard flux-fips-compat 0 2.4.0-r3
Chainguard flux-image-automation-controller 0 0.39.0-r5
Chainguard flux-image-automation-controller-compat 0 0.39.0-r5
Chainguard flux-image-automation-controller-fips 0 0.39.0-r3
Chainguard flux-image-automation-controller-fips-compat 0 0.39.0-r3
Chainguard flux-image-automation-controller-fips-iamguarded-compat 0 0.39.0-r3
Chainguard flux-image-automation-controller-iamguarded-compat 0 0.39.0-r5
Chainguard flux-kustomize-controller 0 1.4.0-r4
Chainguard flux-kustomize-controller-bitnami-compat 0 1.4.0-r4
Chainguard flux-kustomize-controller-fips 0 1.4.0-r3
Chainguard flux-kustomize-controller-fips-iamguarded-compat 0 1.4.0-r3
Chainguard flux-kustomize-controller-iamguarded-compat 0 1.4.0-r4
Chainguard flux-source-controller 0 1.4.1-r6
Chainguard flux-source-controller-bitnami-compat 0 1.4.1-r6
Chainguard flux-source-controller-fips 0 1.4.1-r4
Chainguard flux-source-controller-fips-iamguarded-compat 0 1.4.1-r4
Chainguard flux-source-controller-iamguarded-compat 0 1.4.1-r6
Chainguard fluxcd-source-controller-bitnami-compat 0 1.4.1-r6
Chainguard gitaly-17.10 0 17.10.0-r2
Chainguard gitaly-17.2 0 17.2.9-r3
Chainguard gitaly-17.3 0 17.3.7-r3
Chainguard gitaly-17.4 0 17.4.6-r3
Chainguard gitaly-17.5 0 17.5.4-r3
Chainguard gitaly-17.6 0 17.6.2-r4
Chainguard gitaly-17.7 0 17.7.0-r2
Chainguard gitaly-backup-17.10 0 17.10.0-r2
Chainguard gitaly-backup-17.2 0 17.2.9-r3
Chainguard gitaly-backup-17.3 0 17.3.7-r3
Chainguard gitaly-backup-17.4 0 17.4.6-r3
Chainguard gitaly-backup-17.5 0 17.5.4-r3
Chainguard gitaly-backup-17.6 0 17.6.2-r4
Chainguard gitaly-backup-17.7 0 17.7.0-r2
Chainguard gitaly-backup-fips-17.10 0 17.10.0-r2
Chainguard gitaly-backup-fips-17.2 0 17.2.9-r3
Chainguard gitaly-backup-fips-17.3 0 17.3.7-r4
Chainguard gitaly-backup-fips-17.4 0 17.4.6-r4
Chainguard gitaly-backup-fips-17.5 0 17.5.4-r4
Chainguard gitaly-backup-fips-17.6 0 17.6.2-r2
Chainguard gitaly-backup-fips-17.7 0 17.7.2-r0
Chainguard gitaly-backup-fips-17.8 0 17.8.0-r1
Chainguard gitaly-compat-17.10 0 17.10.0-r2
Chainguard gitaly-compat-17.2 0 17.2.9-r3
Chainguard gitaly-compat-17.3 0 17.3.7-r3
Chainguard gitaly-compat-17.4 0 17.4.6-r3
Chainguard gitaly-compat-17.5 0 17.5.4-r3
Chainguard gitaly-compat-17.6 0 17.6.2-r4
Chainguard gitaly-compat-17.7 0 17.7.0-r2
Chainguard gitaly-fips-17.10 0 17.10.0-r2
Chainguard gitaly-fips-17.2 0 17.2.9-r3
Chainguard gitaly-fips-17.3 0 17.3.7-r4
Chainguard gitaly-fips-17.4 0 17.4.6-r4
Chainguard gitaly-fips-17.5 0 17.5.4-r4
Chainguard gitaly-fips-17.6 0 17.6.2-r2
Chainguard gitaly-fips-17.7 0 17.7.2-r0
Chainguard gitaly-fips-17.8 0 17.8.0-r1
Chainguard gitaly-git-17.10 0 17.10.0-r2
Chainguard gitaly-git-17.2 0 17.2.9-r3
Chainguard gitaly-git-17.3 0 17.3.7-r3
Chainguard gitaly-git-17.4 0 17.4.6-r3
Chainguard gitaly-git-17.5 0 17.5.4-r3
Chainguard gitaly-git-17.6 0 17.6.2-r4
Chainguard gitaly-git-17.7 0 17.7.0-r2
Chainguard gitaly-git-fips-17.10 0 17.10.0-r2
Chainguard gitaly-git-fips-17.3 0 17.3.7-r4
Chainguard gitaly-git-fips-17.4 0 17.4.6-r4
Chainguard gitaly-git-fips-17.5 0 17.5.4-r4
Chainguard gitaly-git-fips-17.6 0 17.6.2-r2
Chainguard gitaly-git-fips-17.7 0 17.7.2-r0
Chainguard gitaly-git-fips-17.8 0 17.8.0-r1
Chainguard gitaly-init-cgroups-17.10 0 17.10.0-r2
Chainguard gitaly-init-cgroups-17.2 0 17.2.9-r3
Chainguard gitaly-init-cgroups-17.2-compat 0 17.2.9-r3
Chainguard gitaly-init-cgroups-17.3 0 17.3.7-r3
Chainguard gitaly-init-cgroups-17.4 0 17.4.6-r3
Chainguard gitaly-init-cgroups-17.5 0 17.5.4-r3
Chainguard gitaly-init-cgroups-17.6 0 17.6.2-r4
Chainguard gitaly-init-cgroups-17.7 0 17.7.0-r2
Chainguard gitaly-init-cgroups-compat-17.10 0 17.10.0-r2
Chainguard gitaly-init-cgroups-compat-17.2 0 17.2.9-r3
Chainguard gitaly-init-cgroups-compat-17.3 0 17.3.7-r3
Chainguard gitaly-init-cgroups-compat-17.4 0 17.4.6-r3
Chainguard gitaly-init-cgroups-compat-17.5 0 17.5.4-r3
Chainguard gitaly-init-cgroups-compat-17.6 0 17.6.2-r4
Chainguard gitaly-init-cgroups-compat-17.7 0 17.7.0-r2
Chainguard gitaly-init-cgroups-fips-17.10 0 17.10.0-r2
Chainguard gitaly-init-cgroups-fips-17.2 0 17.2.9-r3
Chainguard gitaly-init-cgroups-fips-17.3 0 17.3.7-r4
Chainguard gitaly-init-cgroups-fips-17.4 0 17.4.6-r4
Chainguard gitaly-init-cgroups-fips-17.5 0 17.5.4-r4
Chainguard gitaly-init-cgroups-fips-17.6 0 17.6.2-r2
Chainguard gitaly-init-cgroups-fips-17.7 0 17.7.2-r0
Chainguard gitaly-init-cgroups-fips-17.8 0 17.8.0-r1
Chainguard gitea 0 1.22.6-r2
Chainguard gitea-compat 0 1.22.6-r2
Chainguard gitea-fips 0 1.22.6-r2
Chainguard gitea-fips-compat 0 1.22.6-r2
Chainguard gitlab-rails-ee-17.5 0 17.5.5-r1
Chainguard gitlab-rails-ee-17.6 0 17.6.3-r1
Chainguard gitlab-rails-ee-17.7 0 17.7.2-r0
Chainguard gitlab-rails-ee-assets-17.5 0 17.5.5-r1
Chainguard gitlab-rails-ee-assets-17.6 0 17.6.3-r1
Chainguard gitlab-rails-ee-assets-17.7 0 17.7.2-r0
Chainguard gitlab-rails-ee-assets-fips-17.5 0 17.5.5-r1
Chainguard gitlab-rails-ee-assets-fips-17.6 0 17.6.3-r1
Chainguard gitlab-rails-ee-assets-fips-17.7 0 17.7.2-r0
Chainguard gitlab-rails-ee-doc-17.5 0 17.5.5-r1
Chainguard gitlab-rails-ee-doc-17.6 0 17.6.3-r1
Chainguard gitlab-rails-ee-doc-17.7 0 17.7.2-r0
Chainguard gitlab-rails-ee-doc-fips-17.5 0 17.5.5-r1
Chainguard gitlab-rails-ee-doc-fips-17.6 0 17.6.3-r1
Chainguard gitlab-rails-ee-doc-fips-17.7 0 17.7.2-r0
Chainguard gitlab-rails-ee-fips-17.5 0 17.5.5-r1

Related vulnerabilities