HCSEC-2024-09 - HashiCorp go-getter Vulnerable to Argument Injection When Fetching Remote Default Git Branches

Bulletin ID: HCSEC-2024-09
Affected Products / Versions: go-getter 1.5.9 up to 1.7.3; fixed in 1.7.4

Publication Date: April 17, 2024

HashiCorp’s go-getter library is vulnerable to argument injection when executing Git to discover remote branches. This vulnerability, CVE-2024-3817, is fixed in go-getter 1.7.4.

This vulnerability does not affect the go-getter/v2 branch and package.

HashiCorp’s go-getter is a library for Go for downloading files or directories from various sources using a URL as the primary form of input.

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.

Consumers of the go-getter library should evaluate the risk associated with these issues in the context of their go-getter usage and upgrade go-getter to 1.7.4 or later. The latest go-getter releases can be found at Releases · hashicorp/go-getter · GitHub.

This issue was identified by Alessio Della Libera from Snyk

We deeply appreciate any effort to coordinate disclosure of security vulnerabilities. For information about security at HashiCorp and the reporting of security vulnerabilities, please see https://hashicorp.com/security.

1 Like