---
id: CVE-2025-21613
title: 'go-git: argument injection via the URL field (CVE-2025-21613)'
summary: >-
  An argument injection vulnerability was found in go-git. This flaw allows an
  attacker to set arbitrary values to git-upload-pack flags, leading to command
  or code execution, exposure of sensitive data, or other unintended behavior.
  This is…
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'
cvssSource: vendor
cwe: CWE-88
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.18
affected:
  - builds_for_red_hat_openshift
  - openshift_developer_tools_and_services
  - openshift_serverless
  - advanced_cluster_management_for_kubernetes 2
  - ceph_storage 7
  - openshift_ai_rhoai
  - openshift_container_platform 4
  - openshift_virtualization 4
  - openshift_gitops 1.14
  - openshift_gitops 1.15
  - rhacs_4_4_for_rhel 8
  - rhacs_4_5_for_rhel 8
  - rhacs_4_6_for_rhel 8
  - openstack_platform 16.2
  - 9base_oadp_1_4
  - openstack_platform 17.1
  - openshift_container_platform 4.16
  - openshift_container_platform 4.17
  - openshift_container_platform 4.18
  - enterprise_linux_appstream_v_8
  - enterprise_linux_appstream_eus_v_9_4
  - enterprise_linux_appstream_v_9
  - builds_for_red_hat_openshift 1.1.1
  - builds_for_red_hat_openshift 1.2.2
  - openshift_data_foundation 4.22
  - trusted_profile_analyzer 1.2
patched:
  - openshift_gitops 1.14
  - openshift_gitops 1.15
  - rhacs_4_4_for_rhel 8
  - rhacs_4_5_for_rhel 8
  - rhacs_4_6_for_rhel 8
  - openstack_platform 16.2
  - 9base_oadp_1_4
  - openstack_platform 17.1
  - openshift_container_platform 4.16
  - openshift_container_platform 4.17
  - openshift_container_platform 4.18
  - enterprise_linux_appstream_v_8
  - enterprise_linux_appstream_eus_v_9_4
  - enterprise_linux_appstream_v_9
  - builds_for_red_hat_openshift 1.1.1
  - builds_for_red_hat_openshift 1.2.2
  - openshift_data_foundation 4.22
  - trusted_profile_analyzer 1.2
published: '2025-01-06'
updated: '2026-10-16'
sourceUpdated: '2026-10-16T10:31:06+00:00'
source: CSAF
sourceUrl: 'https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-21613.json'
references:
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-21613.json
  - url: 'https://access.redhat.com/security/cve/CVE-2025-21613'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2335888'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2025-21613'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-21613'
  - url: 'https://github.com/go-git/go-git/security/advisories/GHSA-v725-9546-7q7m'
  - url: 'https://pkg.go.dev/vuln/GO-2025-3368'
  - url: 'https://access.redhat.com/errata/RHSA-2025:3069'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1888'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1468'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1334'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0907'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1869'
  - url: 'https://access.redhat.com/errata/RHSA-2025:11396'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1870'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1704'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0654'
  - url: 'https://access.redhat.com/errata/RHSA-2025:1119'
  - url: 'https://access.redhat.com/errata/RHSA-2024:6121'
  - url: 'https://access.redhat.com/errata/RHSA-2024:6122'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0401'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0662'
  - url: 'https://access.redhat.com/errata/RHSA-2025:3344'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0715'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0754'
  - url: 'https://access.redhat.com/errata/RHSA-2026:37387'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0444'
  - url: 'https://access.redhat.com/errata/RHSA-2025:0445'
tags:
  - csaf
  - vex
  - red-hat
  - osv
  - go
epss: 0.01278
epssPercentile: 0.6983
aliases:
  - GO-2025-3368
  - GHSA-v725-9546-7q7m
ecosystem: go
ingestedAt: '2026-07-09T18:56:37.011Z'
---

## Overview

An argument injection vulnerability was found in go-git. This flaw allows an attacker to set arbitrary values to git-upload-pack flags, leading to command or code execution, exposure of sensitive data, or other unintended behavior. This is only possible in configurations where the file transport protocol is being used.

## Vendor advisories

- **RHSA-2025:3069** · Red Hat · fixed in: Red Hat OpenShift GitOps 1.14 · released 2025-03-20 · [advisory](https://access.redhat.com/errata/RHSA-2025:3069)
- **RHSA-2025:1888** · Red Hat · fixed in: Red Hat OpenShift GitOps 1.15 · released 2025-02-26 · [advisory](https://access.redhat.com/errata/RHSA-2025:1888)
- **RHSA-2025:1468** · Red Hat · fixed in: RHACS 4.4 for RHEL 8 · released 2025-02-13 · [advisory](https://access.redhat.com/errata/RHSA-2025:1468)
- **RHSA-2025:1334** · Red Hat · fixed in: RHACS 4.5 for RHEL 8 · released 2025-02-11 · [advisory](https://access.redhat.com/errata/RHSA-2025:1334)
- **RHSA-2025:0907** · Red Hat · fixed in: RHACS 4.6 for RHEL 8 · released 2025-02-03 · [advisory](https://access.redhat.com/errata/RHSA-2025:0907)
- **RHSA-2025:1869** · Red Hat · fixed in: Red Hat OpenStack Platform 16.2 · released 2025-02-26 · [advisory](https://access.redhat.com/errata/RHSA-2025:1869)
- **RHSA-2025:11396** · Red Hat · fixed in: 9Base-OADP-1.4 · released 2025-07-18 · [advisory](https://access.redhat.com/errata/RHSA-2025:11396)
- **RHSA-2025:1870** · Red Hat · fixed in: Red Hat OpenStack Platform 17.1 · released 2025-02-26 · [advisory](https://access.redhat.com/errata/RHSA-2025:1870)
- **RHSA-2025:1704** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.16 · released 2025-02-27 · [advisory](https://access.redhat.com/errata/RHSA-2025:1704)
- **RHSA-2025:0654** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.17 · released 2025-01-28 · [advisory](https://access.redhat.com/errata/RHSA-2025:0654)
- **RHSA-2025:1119** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.17 · released 2025-02-11 · [advisory](https://access.redhat.com/errata/RHSA-2025:1119)
- **Red Hat VEX** · Important · affected: Builds for Red Hat OpenShift, OpenShift Developer Tools and Services, OpenShift Serverless, Red Hat Advanced Cluster Management for Kubernetes 2, Red Hat Ceph Storage 7, Red Hat OpenShift AI (RHOAI), … · no fix planned: OpenShift Developer Tools and Services, Red Hat OpenShift Container Platform 4, Builds for Red Hat OpenShift, OpenShift Serverless, … · updated 2026-10-16 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-21613.json)

**go-git: argument injection via the URL field** — rated Important by Red Hat. Released 2025-01-06, updated 2026-10-16.

Affected:

- Builds for Red Hat OpenShift
- OpenShift Developer Tools and Services
- OpenShift Serverless
- Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat Ceph Storage 7
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Virtualization 4

Fixed:

- Red Hat OpenShift GitOps 1.14
- Red Hat OpenShift GitOps 1.15
- RHACS 4.4 for RHEL 8
- RHACS 4.5 for RHEL 8
- RHACS 4.6 for RHEL 8
- Red Hat OpenStack Platform 16.2
- 9Base-OADP-1.4
- Red Hat OpenStack Platform 17.1
- Red Hat OpenShift Container Platform 4.16
- Red Hat OpenShift Container Platform 4.17
- Red Hat OpenShift Container Platform 4.18
- Red Hat Enterprise Linux AppStream (v. 8)
- Red Hat Enterprise Linux AppStream EUS (v.9.4)
- Red Hat Enterprise Linux AppStream (v. 9)
- Builds for Red Hat OpenShift 1.1.1
- Builds for Red Hat OpenShift 1.2.2
- Red Hat Openshift Data Foundation 4.22
- Red Hat Trusted Profile Analyzer 1.2

No fix planned:

- OpenShift Developer Tools and Services
- Red Hat OpenShift Container Platform 4
- Builds for Red Hat OpenShift
- OpenShift Serverless
- Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat Ceph Storage 7
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift Virtualization 4

Not affected:

- RHACS 4.4 for RHEL 8
- RHACS 4.5 for RHEL 8
- 9Base-OADP-1.4
- Red Hat OpenShift Container Platform 4.16
- Red Hat OpenShift Container Platform 4.17
- Red Hat OpenShift Container Platform 4.18
- Builds for Red Hat OpenShift 1.1.1
- Builds for Red Hat OpenShift 1.2.2
- Red Hat Openshift Data Foundation 4.22
- Red Hat OpenShift Container Platform 4

## Remediation

Before applying this update, make sure all previously released errata
relevant to your system have been applied.

For details on how to apply this update, refer to:

https://access.redhat.com/articles/11258 https://access.redhat.com/errata/RHSA-2025:3069
Before applying this update, make sure all previously released errata
relevant to your system have been applied.

For details on how to apply this update, refer to:

https://access.redhat.com/articles/11258 https://access.redhat.com/errata/RHSA-2025:1888
If you are using an earlier version of RHACS 4.4, you are advised to upgrade to this patch release 4.4.8. https://access.redhat.com/errata/RHSA-2025:1468

Workarounds / mitigations:

- In cases where it is not possible to update to the latest version of go-git, it is recommended to enforce validation rules for values passed in the URL field.

## Package advisory (CVE-2025-21613)

Affected packages:

- `github.com/go-git/go-git/v4 >= 4.0.0`
- `github.com/go-git/go-git/v5 < 5.13.0`
- `gopkg.in/src-d/go-git.v4 >= 4.0.0`

Patched in:

- `github.com/go-git/go-git/v5 5.13.0`

Source: https://osv.dev/vulnerability/GO-2025-3368
