Skip to content
OpenAdvisories

Description

A path traversal vulnerability was discovered in go-git versions prior to v5.11. This vulnerability allows an attacker to create and amend files across the filesystem. In the worse case scenario, remote code execution could be achieved.

Applications are only affected if they are using the ChrootOS https://pkg.go.dev/github.com/go-git/go-billy/v5/osfs#ChrootOS , which is the default when using "Plain" versions of Open and Clone funcs (e.g. PlainClone). Applications using BoundOS https://pkg.go.dev/github.com/go-git/go-billy/v5/osfs#BoundOS  or in-memory filesystems are not affected by this issue.
This is a go-git implementation issue and does not affect the upstream git cli.

Affected products

VendorProductAffectedFixed
go-git go-git 5.11.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 golang-github-go-git-go-git 5.11.0-1 —
Debian 13 golang-github-go-git-go-git 5.11.0-1 —
Debian 12 golang-github-go-git-go-git No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS golang-github-go-git-go-git 5.4.2-4ubuntu0.24.04.3+esm2 USN-8088-1
Ubuntu Pro 22.04 LTS golang-github-go-git-go-git 5.4.2-3ubuntu0.1~esm1 USN-8088-1
ReleasePackageFixed inAdvisory
Red Hat Serverless 1 openshift-serverless-clients 1.10.0-6.el8 RHSA-2024:0880
Red Hat Ceph Storage 7 ceph +25 2:18.2.1-194.el8cp RHSA-2024:3925
Red Hat Ceph Storage 7 cephadm 2:18.2.1-194.el9cp RHSA-2024:3925
Red Hat Ceph Storage 7 cephadm-ansible 1:3.2.0-1.el9cp RHSA-2024:3925
Red Hat Ceph Storage 7 gperftools +1 1:2.7-9.el8cp RHSA-2024:3925
Red Hat Ceph Storage 7 liboath +1 2.6.2-3.el8cp RHSA-2024:3925
Red Hat Ceph Storage 7 libunwind 1.3.1-3.el8cp RHSA-2024:3925
Red Hat Ceph Storage 7 thrift 0.13.0-2.el8cp RHSA-2024:3925
Red Hat Ceph Storage 6 ceph +25 2:17.2.6-216.el8cp RHSA-2024:2631
Red Hat Ceph Storage 6 cephadm 2:17.2.6-216.el9cp RHSA-2024:2631
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Ceph Storage 5 ceph +43 2:16.2.10-266.el8cp RHSA-2024:4118
Red Hat Ceph Storage 5 ceph-ansible 6.0.28.8-1.el8cp RHSA-2024:4118

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 amazon-ssm-agent 3.2.2222.0-1.amzn2023 ALAS2023-2024-526
Amazon Linux 2 amazon-ssm-agent 3.2.2222.0-1.amzn2 ALAS2-2024-2458

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 packer 1.9.5-1 —
Azure Linux 2 (CBL-Mariner) cri-o 1.22.3-12 —
Azure Linux 2 (CBL-Mariner) packer 1.9.5-3 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling bom 0.6.0-r0 —
Wolfi rolling gitness 3.0.0_beta5-r0 —
Wolfi rolling gitsign +2 0.8.1-r0 —
Wolfi rolling go-licenses 1.6.0-r9 —
Wolfi rolling goreleaser 1.24.0-r0 —
Wolfi rolling nuclei 3.2.0-r0 —
Wolfi rolling pulumi-kubernetes-operator 1.14.0-r6 —
Wolfi rolling scorecard 4.13.1-r4 —
Wolfi rolling src-fingerprint 0.19.0-r9 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/go-git/go-git/v5 >= 5.0.0, < 5.11.0 5.11.0 GHSA-449p-3h89-pw88
Go gopkg.in/src-d/go-git.v4 >= 4.0.0, <= 4.13.1 — GHSA-449p-3h89-pw88
Go gopkg.in/src-d/go-git.v4 >= 4.7.1 — GO-2024-2456

Advisories 8

References