CVE-2023-0475: Github.com/hashicorp/go getter Data Amplification Vulnerability
MODERATECVE-2023-0475 is a MODERATE (CVSS 4.2) data amplification vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting Github.com/hashicorp/go getter libraries in the Go ecosystem. The issue involves data amplification in hashicorp go-getter. Remediation is available by upgrading affected packages to version 1.7.0, 2.2.0.
CVE-2023-0475 at a Glance
Security Impact
CVSS: 4.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-0475
To remediate this vulnerability, upgrade all affected Github.com/hashicorp/go getter dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/hashicorp/go-getter to 1.7.0
Upgrade github.com/hashicorp/go-getter/v2 to 2.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/hashicorp/go-getter
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-0475, inspect your project dependencies for Github.com/hashicorp/go getter:
inspect dependencies for github.com/hashicorp/go-getter
Analyze the terminal output to locate any version of Github.com/hashicorp/go getter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In Github.com/hashicorp/go getter, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-0475 Affected Github.com/hashicorp/go getter Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/hashicorp/go-getter
|
Go |
< 1.7.0
|
1.7.0
|
|
github.com/hashicorp/go-getter/v2
|
Go |
≥ 2.0.0
< 2.2.0
|
2.2.0
|
References
Frequently Asked Questions
What is CVE-2023-0475?
Which Github.com/hashicorp/go getter versions are affected?
What version fixes CVE-2023-0475?
Is github.com/hashicorp/go-getter affected?
Is github.com/hashicorp/go-getter/v2 affected?
What is the CVSS score of CVE-2023-0475?
What CWE is associated with CVE-2023-0475?
How can I check Go dependencies for CVE-2023-0475?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jpxj-2jvg-6jv9",
"modified" : "2024-05-20T21:47:40Z",
"published" : "2023-02-16T21:30:28Z",
"aliases" : [ "CVE-2023-0475" ],
"summary" : "Data Amplification in HashiCorp go-getter",
"details" : "HashiCorp go-getter up to 1.6.2 and 2.1.1 is vulnerable to decompression bombs. Fixed in 1.7.0 and 2.2.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/hashicorp/go-getter"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/hashicorp/go-getter/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-0475"
}, {
"type" : "WEB",
"url" : "https://github.com/hashicorp/go-getter/commit/0edab85348271c843782993345b07b1ac98912e6"
}, {
"type" : "WEB",
"url" : "https://github.com/hashicorp/go-getter/commit/78e6721a2a76266718dc92c3c03c1571dffdefdc"
}, {
"type" : "WEB",
"url" : "https://discuss.hashicorp.com/t/hcsec-2023-4-go-getter-vulnerable-to-denial-of-service-via-malicious-compressed-archive/50125"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hashicorp/go-getter"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-409" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-16T23:34:17Z",
"nvd_published_at" : "2023-02-16T19:15:00Z"
}
}