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.
CVE-2023-49569 - Critical Severity Vulnerability
Vulnerable Libraries - github.com/src-d/go-git/storage-v4.13.1, gopkg.in/src-d/go-git.v4-v4.13.1, github.com/src-d/go-git/storage/filesystem/dotgit-v4.13.1, github.com/src-d/go-git/storage/filesystem-v4.13.1
github.com/src-d/go-git/storage-v4.13.1
Projects has been moved to:
Dependency Hierarchy: - github.com/fossas/fossa-cli/cmd/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 (Root Library) - github.com/fossas/fossa-cli/api/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - github.com/fossas/fossa-cli/config-v1.1.8 - github.com/fossas/fossa-cli/vcs-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - gopkg.in/src-d/go-git.v4-v4.13.1 - github.com/src-d/go-git/plumbing/protocol/packp-v4.13.1 - github.com/src-d/go-git/plumbing-v4.13.1 - github.com/src-d/go-git/plumbing/transport-v4.13.1 - github.com/src-d/go-git/plumbing/revlist-v4.13.1 - github.com/src-d/go-git/plumbing/object-v4.13.1 - :x: **github.com/src-d/go-git/storage-v4.13.1** (Vulnerable Library)
gopkg.in/src-d/go-git.v4-v4.13.1
Project has been moved to: https://github.com/go-git/go-git
Library home page: https://proxy.golang.org/gopkg.in/src-d/go-git.v4/@v/v4.13.1.zip
Dependency Hierarchy: - github.com/fossas/fossa-cli/cmd/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 (Root Library) - github.com/fossas/fossa-cli/api/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - github.com/fossas/fossa-cli/config-v1.1.8 - github.com/fossas/fossa-cli/vcs-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - :x: **gopkg.in/src-d/go-git.v4-v4.13.1** (Vulnerable Library)
github.com/src-d/go-git/storage/filesystem/dotgit-v4.13.1
Projects has been moved to:
Dependency Hierarchy: - github.com/fossas/fossa-cli/cmd/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 (Root Library) - github.com/fossas/fossa-cli/api/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - github.com/fossas/fossa-cli/config-v1.1.8 - github.com/fossas/fossa-cli/vcs-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - gopkg.in/src-d/go-git.v4-v4.13.1 - github.com/src-d/go-git/plumbing/protocol/packp-v4.13.1 - github.com/src-d/go-git/plumbing-v4.13.1 - github.com/src-d/go-git/plumbing/transport-v4.13.1 - github.com/src-d/go-git/plumbing/revlist-v4.13.1 - github.com/src-d/go-git/plumbing/object-v4.13.1 - github.com/src-d/go-git/storage-v4.13.1 - :x: **github.com/src-d/go-git/storage/filesystem/dotgit-v4.13.1** (Vulnerable Library)
github.com/src-d/go-git/storage/filesystem-v4.13.1
Projects has been moved to:
Dependency Hierarchy: - github.com/fossas/fossa-cli/cmd/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 (Root Library) - github.com/fossas/fossa-cli/api/fossa-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - github.com/fossas/fossa-cli/config-v1.1.8 - github.com/fossas/fossa-cli/vcs-4fe7d838f3a61541af13233ee03519d3a20e5ef8 - gopkg.in/src-d/go-git.v4-v4.13.1 - github.com/src-d/go-git/plumbing/protocol/packp-v4.13.1 - github.com/src-d/go-git/plumbing-v4.13.1 - github.com/src-d/go-git/plumbing/transport-v4.13.1 - github.com/src-d/go-git/plumbing/transport/file-v4.13.1 - github.com/src-d/go-git/plumbing/transport/server-v4.13.1 - :x: **github.com/src-d/go-git/storage/filesystem-v4.13.1** (Vulnerable Library)
Found in base branch: master
Vulnerability Details
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.
Publish Date: 2024-01-12
URL: CVE-2023-49569
CVSS 3 Score Details (9.8)
Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: High
For more information on CVSS3 Scores, click here.Suggested Fix
Type: Upgrade version
Origin: https://github.com/go-git/go-git/security/advisories/GHSA-449p-3h89-pw88
Release Date: 2024-01-12
Fix Resolution: v5.11.0