Go Vulnerability Database
GO-2024-2800
Argument injection when fetching remote default Git branches in github.com/hashicorp/go-getter
Details
When go-getter is performing a Git operation, go-getter will try to clone the given repository. If a Git reference is not passed along with the Git url, go-getter will then try to check the remote repository's HEAD reference of its default branch by passing arguments to the Git binary on the host it is executing on.
An attacker may format a Git URL in order to inject additional Git arguments to the Git call.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | github.com/hashicorp/go-getter | From 1.5.9 before 1.7.4 (fixed in 1.7.4) |