Skip to content

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

Critical severity GitHub Reviewed Published Apr 17, 2024 to the GitHub Advisory Database • Updated Apr 28, 2024

Package

gomod github.com/hashicorp/go-getter (Go)

Affected versions

>= 1.5.9, < 1.7.4

Patched versions

1.7.4

Description

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.

References

Published by the National Vulnerability Database Apr 17, 2024
Published to the GitHub Advisory Database Apr 17, 2024
Reviewed Apr 18, 2024
Last updated Apr 28, 2024

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2024-3817

GHSA ID

GHSA-q64h-39hv-4cf7

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.