CVE-2024-6257 HashiCorp go-getter Vulnerable to Code Execution On Git Update Via Git Config Manipulation
Attackers can achieve arbitrary code execution by manipulating Git configuration to trigger malicious updates in the HashiCorp go-getter library.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-6257?
CVE-2024-6257 is a high-severity command injection vulnerability in HashiCorp Shared library, published on 25 Jun 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Official description
HashiCorp’s go-getter library can be coerced into executing Git update on an existing maliciously modified Git Configuration, potentially leading to arbitrary code execution.
Weakness: CWE-77
Which versions are affected by CVE-2024-6257?
3 open source packages ship an affected version, including github.com/hashicorp/go-getter. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/hashicorp/go-getter Go | All versions | 1.7.5 |
github.com/hashicorp/go-getter Go | All versions | 1.7.5 |
github.com/hashicorp/go-getter Go | All versions | 1.7.5 |
Linux distribution packages (2)
conftest openSUSE:Tumbleweed | All versions | 0.54.0-1.1 |
trivy openSUSE:Tumbleweed | All versions | 0.53.0-1.1 |
Products include Hashicorp Go-Getter.
How do I fix CVE-2024-6257?
Upgrade github.com/hashicorp/go-getter to 1.7.5 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-6257 being exploited?
There is no known exploitation of CVE-2024-6257 in the wild and no public exploit code.
Other vulnerabilities in HashiCorp Shared library
Sources
Also known as AZL-42982, BELL-CVE-2024-6257, DEBIAN-CVE-2024-6257, GHSA-xfhp-jf8p-mh5w, GO-2024-2948, ROOT-APP-GOBINARY-CVE-2024-6257 and 3 more.