CVE-2023-49569
go-git: Maliciously crafted Git server replies can lead to path traversal and RCE on go-git clients
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, Red Hat, Azure Linux, CBL-Mariner. Rated lower by Amazon (high), Ubuntu (medium).
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 packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| Azure Linux 3.0 | packer | 0:1.9.5-1.azl3 |
| CBL-Mariner 2.0 | cri-o, packer | 0:1.22.3-12.cm2 and 1 more |
| go::GitHub Security Advisory Go | github.com/go-git/go-git/v5, gopkg.in/src-d/go-git.v4 | 5.11.0 |
| amazon linux 1 | amazon-ssm-agent, amazon-ssm-agent-debuginfo | 3.2.2222.0-1.amzn1 |
| amazon linux 2 | amazon-ssm-agent, amazon-ssm-agent-debuginfo | 3.2.2222.0-1.amzn2 |
| amazon linux 2023 | amazon-ssm-agent, amazon-ssm-agent-debuginfo, amazon-ssm-agent-debugsource | 3.2.2222.0-1.amzn2023 |
| chainguard | bom, gitness, gitsign and 6 more | 0.6.0-r0 and 8 more |
| debian 12 | golang-github-go-git-go-git | no fix listed |
| debian 13 | golang-github-go-git-go-git | 5.11.0-1 |
| debian 14 | golang-github-go-git-go-git | 5.11.0-1 |
| echo | golang-github-go-git-go-git | 5.11.0-1 |
| rapidfort amazon linux 2023 | amazon-ssm-agent | 3.2.2222.0-1.amzn2023 |
Show all 39 entries from 17 sources
| Source | Package | Fixed in |
|---|---|---|
| Azure Linux 3.0 | packer | 0:1.9.5-1.azl3 |
| CBL-Mariner 2.0 | cri-o | 0:1.22.3-12.cm2 |
| CBL-Mariner 2.0 | packer | 0:1.9.5-3.cm2 |
| go::GitHub Security Advisory Go | github.com/go-git/go-git/v5 | 5.11.0 |
| go::GitHub Security Advisory Go | gopkg.in/src-d/go-git.v4 | no fix listed |
| amazon linux 1 | amazon-ssm-agent | 3.2.2222.0-1.amzn1 |
| amazon linux 1 | amazon-ssm-agent-debuginfo | 3.2.2222.0-1.amzn1 |
| amazon linux 2 | amazon-ssm-agent | 3.2.2222.0-1.amzn2 |
| amazon linux 2 | amazon-ssm-agent-debuginfo | 3.2.2222.0-1.amzn2 |
| amazon linux 2023 | amazon-ssm-agent | 3.2.2222.0-1.amzn2023 |
| amazon linux 2023 | amazon-ssm-agent-debuginfo | 3.2.2222.0-1.amzn2023 |
| amazon linux 2023 | amazon-ssm-agent-debugsource | 3.2.2222.0-1.amzn2023 |
| chainguard | bom | 0.6.0-r0 |
| chainguard | gitness | 3.0.0_beta5-r0 |
| chainguard | gitsign | 0.8.1-r0 |
| chainguard | go-licenses | 1.6.0-r9 |
| chainguard | goreleaser | 1.24.0-r0 |
| chainguard | nuclei | 3.2.0-r0 |
| chainguard | pulumi-kubernetes-operator | 1.14.0-r6 |
| chainguard | scorecard | 4.13.1-r4 |
| chainguard | src-fingerprint | 0.19.0-r9 |
| debian 12 | golang-github-go-git-go-git | no fix listed |
| debian 13 | golang-github-go-git-go-git | 5.11.0-1 |
| debian 14 | golang-github-go-git-go-git | 5.11.0-1 |
| echo | golang-github-go-git-go-git | 5.11.0-1 |
| rapidfort amazon linux 2023 | amazon-ssm-agent | 3.2.2222.0-1.amzn2023 |
| rapidfort debian 12 | golang-github-go-git-go-git | 0:5.11.0-1 |
| rapidfort debian 13 | golang-github-go-git-go-git | 0:5.11.0-1 |
| ubuntu 22.04 | golang-github-go-git-go-git | no fix listed |
| ubuntu 24.04 | golang-github-go-git-go-git | no fix listed |
| wolfi | bom | 0.6.0-r0 |
| wolfi | gitness | 3.0.0_beta5-r0 |
| wolfi | gitsign | 0.8.1-r0 |
| wolfi | go-licenses | 1.6.0-r9 |
| wolfi | goreleaser | 1.24.0-r0 |
| wolfi | nuclei | 3.2.0-r0 |
| wolfi | pulumi-kubernetes-operator | 1.14.0-r6 |
| wolfi | scorecard | 4.13.1-r4 |
| wolfi | src-fingerprint | 0.19.0-r9 |