Cloudanix VulnDB

CVE-2024-6257

High · 8.4

CVSS

8.4

EPSS

1.0%

Published

Jun 25, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A widely used helper library can be tricked into running attacker-chosen commands on any system that downloads code or modules with it, potentially giving attackers full control until the library is updated.

Exploitation
Requires User Interaction
Attacker needs
High Privilege
Complexity
Moderate
Impact
Remote Code Execution
Component
Library
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The library can be tricked into running a Git update against a pre-planted malicious .gitconfig, causing arbitrary shell commands to execute under the privileges of the calling process.

Why it matters to the business

Applications and build pipelines that fetch modules or dependencies via go-getter become vectors for full host compromise, source-code theft, or supply-chain insertion, increasing breach and operational-disruption risk until patched.

How an attack unfolds

An attacker first plants a malicious .gitconfig containing a malicious core.sshCommand or similar hook, then supplies a repository URL to the vulnerable go-getter client; when the client performs its update step the injected configuration causes the embedded Git binary to execute attacker-controlled commands.

How to fix it

Upgrade hashicorp/go-getter to commit 5a63fd9c0d5b8da8a6805e8c283f46f0dacb30b3 or a later release that contains the fix; rebuild and redeploy all consuming applications and containers.

How to confirm the fix worked

Confirm the go-getter module version or commit hash in go.mod / vendor tree matches the fixed revision; run regression tests that exercise Git-backed getters with malicious configuration files to verify command execution is no longer possible.

Typical attack path

  1. Plant a malicious .gitconfig reachable by the target process
  2. Craft a go-getter URL or path that references an existing Git working tree
  3. Trigger the client code path that calls Git update or fetch
  4. Git honors the attacker-controlled configuration and executes the payload
  5. Attacker obtains code execution on the host

How to detect it

Review application and build logs for unexpected Git subprocess invocations or .gitconfig writes immediately before dependency fetches; correlate with process-creation events showing shell commands originating from the go-getter code path.

What your security team should do

  • Immediately update all direct and transitive uses of go-getter to the patched commit
  • Scan build pipelines and dependency manifests for the vulnerable library
  • Add dependency-update and integrity checks to CI to prevent re-introduction of older versions

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/hashicorp/go-getter 0 1.7.5
Chainguard conftest 0 0.53.0-r1
Chainguard conftest-fips 0 0.53.0-r1
Chainguard datadog-agent 0 7.54.1-r1
Chainguard datadog-agent-core-integrations 0 7.54.1-r1
Chainguard datadog-agent-core-integrations-fips 0 7.54.1-r1
Chainguard datadog-agent-fakeintake 0 7.54.1-r1
Chainguard datadog-agent-fakeintake-fips 0 7.54.1-r1
Chainguard datadog-agent-fips 0 7.54.1-r1
Chainguard datadog-agent-jmx 0 7.54.1-r1
Chainguard datadog-agent-jmx-fips 0 7.54.1-r1
Chainguard datadog-agent-oci-compat 0 7.54.1-r1
Chainguard datadog-agent-oci-compat-fips 0 7.54.1-r1
Chainguard datadog-agent-s6-overlay 0 7.54.1-r1
Chainguard datadog-agent-s6-overlay-fips 0 7.54.1-r1
Chainguard datadog-cluster-agent 0 7.54.1-r1
Chainguard datadog-cluster-agent 0 7.71.2-r3
Chainguard datadog-cluster-agent-fips 0 7.54.1-r1
Chainguard datadog-cluster-agent-oci-compat 0 7.54.1-r1
Chainguard datadog-cluster-agent-oci-compat 0 7.71.2-r3
Chainguard datadog-cluster-agent-oci-compat-fips 0 7.54.1-r1
Chainguard dogstatsd 0 7.54.1-r1
Chainguard grype 0 0.79.1-r1
Chainguard k9s 0 0.32.5-r1
Chainguard kots 0 1.109.14-r1
Chainguard kots-compat 0 1.109.14-r1
Chainguard kots-symlink-compat 0 1.109.14-r1
Chainguard kubescape 0 3.0.11-r3
Chainguard opentofu 0 1.7.2-r3
Chainguard opentofu-1.7 0 1.7.7-r9
Chainguard opentofu-1.7 0 1.7.10-r6
Chainguard opentofu-1.7-compat 0 1.7.7-r9
Chainguard opentofu-1.7-compat 0 1.7.10-r6
Chainguard opentofu-1.7-local-provider-config 0 1.7.7-r9
Chainguard opentofu-1.7-local-provider-config 0 1.7.10-r6
Chainguard opentofu-compat 0 1.7.2-r3
Chainguard opentofu-local-provider-config 0 1.7.2-r3
Chainguard snyk-cli 0 1.1291.1-r3
Chainguard terraform 0 1.5.7-r14
Chainguard terraform-compat 0 1.5.7-r14
Chainguard terraform-compat 0 1.5.7-r34
Chainguard terraform-fips-1.5 0 1.5.7-r15
Chainguard terraform-fips-1.5-compat 0 1.5.7-r15
Chainguard terraform-fips-1.5-local-provider-config 0 1.5.7-r15
Chainguard terraform-local-provider-config 0 1.5.7-r14
Chainguard terragrunt 0 0.59.5-r1
Chainguard terragrunt-docs 0 0.59.5-r1
Chainguard tflint 0 0.51.1-r2
Chainguard tflint-compat 0 0.51.1-r2
Chainguard tfsec 0 1.28.6-r3
Chainguard trivy 0 0.52.2-r1
Chainguard trivy-fips 0 0.52.2-r1
Chainguard wolfictl 0 0.19.0-r1
Chainguard zarf 0 0.35.0-r2
Chainguard zot 0 2.0.4-r8
Debian:11 golang-github-hashicorp-go-getter 0 No fix
Debian:12 golang-github-hashicorp-go-getter 0 No fix
Debian:13 golang-github-hashicorp-go-getter 0 No fix
SUSE:Package Hub 15 SP5 trivy 0 0.54.1-bp155.2.3.1
SUSE:Package Hub 15 SP6 trivy 0 0.54.1-bp156.2.3.1
Ubuntu:18.04:LTS golang-github-hashicorp-go-getter 0 No fix
Ubuntu:20.04:LTS golang-github-hashicorp-go-getter 0 No fix
Ubuntu:20.04:LTS golang-github-jesseduffield-go-getter 0 No fix
Ubuntu:22.04:LTS golang-github-hashicorp-go-getter 0 No fix
Ubuntu:22.04:LTS golang-github-jesseduffield-go-getter 0 No fix
Ubuntu:24.04:LTS golang-github-hashicorp-go-getter 0 No fix
Ubuntu:24.04:LTS golang-github-jesseduffield-go-getter 0 No fix
Ubuntu:24.10 golang-github-hashicorp-go-getter 0 No fix
Ubuntu:25.04 golang-github-hashicorp-go-getter 0 No fix
Ubuntu:25.10 golang-github-hashicorp-go-getter 0 No fix
Ubuntu:Pro:18.04:LTS golang-github-hashicorp-go-getter 0 No fix
Ubuntu:Pro:20.04:LTS golang-github-hashicorp-go-getter 0 No fix
Ubuntu:Pro:20.04:LTS golang-github-jesseduffield-go-getter 0 No fix
Wolfi conftest 0 0.53.0-r1
Wolfi datadog-agent 0 7.54.1-r1
Wolfi datadog-agent-core-integrations 0 7.54.1-r1
Wolfi datadog-agent-fakeintake 0 7.54.1-r1
Wolfi datadog-agent-jmx 0 7.54.1-r1
Wolfi datadog-agent-oci-compat 0 7.54.1-r1
Wolfi datadog-agent-s6-overlay 0 7.54.1-r1
Wolfi datadog-cluster-agent 0 7.54.1-r1
Wolfi datadog-cluster-agent 0 7.71.2-r3
Wolfi datadog-cluster-agent-oci-compat 0 7.54.1-r1
Wolfi datadog-cluster-agent-oci-compat 0 7.71.2-r3
Wolfi dogstatsd 0 7.54.1-r1
Wolfi grype 0 0.79.1-r1
Wolfi k9s 0 0.32.5-r1
Wolfi kots 0 1.109.14-r1
Wolfi kots-compat 0 1.109.14-r1
Wolfi kots-symlink-compat 0 1.109.14-r1
Wolfi kubescape 0 3.0.11-r3
Wolfi opentofu 0 1.7.2-r3
Wolfi opentofu-1.7 0 1.7.10-r6
Wolfi opentofu-1.7-compat 0 1.7.10-r6
Wolfi opentofu-1.7-local-provider-config 0 1.7.10-r6
Wolfi opentofu-compat 0 1.7.2-r3
Wolfi opentofu-local-provider-config 0 1.7.2-r3
Wolfi snyk-cli 0 1.1291.1-r3
Wolfi terraform 0 1.5.7-r14
Wolfi terraform-compat 0 1.5.7-r14
Wolfi terraform-compat 0 1.5.7-r34
Wolfi terraform-local-provider-config 0 1.5.7-r14
Wolfi terragrunt 0 0.59.5-r1
Wolfi terragrunt-docs 0 0.59.5-r1
Wolfi tflint 0 0.51.1-r2
Wolfi tflint-compat 0 0.51.1-r2
Wolfi tfsec 0 1.28.6-r3
Wolfi trivy 0 0.52.2-r1
Wolfi wolfictl 0 0.19.0-r1
Wolfi zarf 0 0.35.0-r2
Wolfi zot 0 2.0.4-r8
openSUSE:Leap 15.5 trivy 0 0.54.1-bp155.2.3.1
openSUSE:Leap 15.6 trivy 0 0.54.1-bp156.2.3.1
openSUSE:Tumbleweed conftest 0 0.54.0-1.1
openSUSE:Tumbleweed trivy 0 0.53.0-1.1

Related vulnerabilities