Vulnerabilities in pkg:golang/github.com/hashicorp/go-getter/s3/v2

PACKAGE
Advisory Identifier: GHSA-28r2-q6m8-9hpx
Advisory Summary

CVE-2022-30323 is a HIGH (CVSS 8.6) remote code execution vulnerability (General Security Weakness) affecting Github.com/hashicorp/go getter libraries in the Go ecosystem. The issue involves hashicorp go-getter unsafe downloads could lead to asymmetric resource exhaustion. Remediation is available by upgrading affected packages to version 1.6.1, 2.1.0.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/hashicorp/go-getter/s3/v2

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/hashicorp/go-getter/s3/v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-28r2-q6m8-9hpx CVE-2022-30323 HIGH HashiCorp go-getter unsafe downloads could lead to asymmetric resource exhaustion
GHSA-cjr4-fv6c-f3mv CVE-2022-30322 HIGH HashiCorp go-getter unsafe downloads could lead to arbitrary host access
GHSA-fcgg-rvwg-jv58 CVE-2022-30321 HIGH HashiCorp go-getter unsafe downloads
GHSA-x24g-9w7v-vprh CVE-2022-26945 CRITICAL HashiCorp go-getter command injection

CVE-2022-30323 at a Glance

CVE Identifier CVE-2022-30323
GHSA Identifier GHSA-28r2-q6m8-9hpx
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification General Security Weakness
Affected Product Github.com/hashicorp/go getter
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability High (A:H)

How to Fix CVE-2022-30323

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.

github.com/hashicorp/go-getter fixed: 1.6.1
Upgrade github.com/hashicorp/go-getter to 1.6.1
github.com/hashicorp/go-getter fixed: 2.1.0
Upgrade github.com/hashicorp/go-getter to 2.1.0
github.com/hashicorp/go-getter/v2 fixed: 2.1.0
Upgrade github.com/hashicorp/go-getter/v2 to 2.1.0
github.com/hashicorp/go-getter/s3/v2 fixed: 2.1.0
Upgrade github.com/hashicorp/go-getter/s3/v2 to 2.1.0
github.com/hashicorp/go-getter/gcs/v2 fixed: 2.1.0
Upgrade github.com/hashicorp/go-getter/gcs/v2 to 2.1.0
Verify Direct and Transitive Dependencies

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-2022-30323, 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.6.1), 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 General Security Weakness. 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

HashiCorp go-getter through 2.0.2 does not safely perform downloads. Asymmetric resource exhaustion could occur when go-getter processed malicious HTTP responses.

CVE-2022-30323 Affected Github.com/hashicorp/go getter Versions

5 component(s)
Fixed Versions:
1.6.12.1.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/hashicorp/go-getter
Go
< 1.6.1
1.6.1
github.com/hashicorp/go-getter
Go
≥ 2.0.0
< 2.1.0
2.1.0
github.com/hashicorp/go-getter/v2
Go
< 2.1.0
2.1.0
github.com/hashicorp/go-getter/s3/v2
Go
< 2.1.0
2.1.0
github.com/hashicorp/go-getter/gcs/v2
Go
< 2.1.0
2.1.0

References

Frequently Asked Questions

What is CVE-2022-30323?
CVE-2022-30323 is a security vulnerability in Github.com/hashicorp/go getter involving HashiCorp go-getter unsafe downloads could lead to asymmetric resource exhaustion under General Security Weakness.
Which Github.com/hashicorp/go getter versions are affected?
Affected versions include releases prior to 1.6.1, 2.1.0 across affected packages: github.com/hashicorp/go-getter, github.com/hashicorp/go-getter/v2, github.com/hashicorp/go-getter/s3/v2, github.com/hashicorp/go-getter/gcs/v2.
What version fixes CVE-2022-30323?
Upgrading to 1.6.1, 2.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/hashicorp/go-getter affected?
Yes, github.com/hashicorp/go-getter is affected in releases prior to 1.6.1, 2.1.0. Upgrade your dependency to 1.6.1, 2.1.0 or later.
Is github.com/hashicorp/go-getter/v2 affected?
Yes, github.com/hashicorp/go-getter/v2 is affected in releases prior to 2.1.0. Upgrade your dependency to 2.1.0 or later.
What is the CVSS score of CVE-2022-30323?
CVE-2022-30323 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H.
What CWE is associated with CVE-2022-30323?
CVE-2022-30323 is classified under General Security Weakness.
How can I check Go dependencies for CVE-2022-30323?
Run the dependency tree command: 'inspect dependencies for github.com/hashicorp/go-getter'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-28r2-q6m8-9hpx",
  "modified" : "2024-05-20T21:27:04Z",
  "published" : "2022-05-26T00:01:27Z",
  "aliases" : [ "CVE-2022-30323" ],
  "summary" : "HashiCorp go-getter unsafe downloads could lead to asymmetric resource exhaustion",
  "details" : "HashiCorp go-getter through 2.0.2 does not safely perform downloads. Asymmetric resource exhaustion could occur when go-getter processed malicious HTTP responses.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/go-getter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/go-getter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/go-getter/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/go-getter/s3/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/go-getter/gcs/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-30323"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/go-getter/pull/359"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/go-getter/pull/361"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/go-getter/commit/38e97387488f5439616be60874979433a12edb48"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/go-getter/commit/a2ebce998f8d4105bd4b78d6c99a12803ad97a45"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.hashicorp.com"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.hashicorp.com/t/hcsec-2022-13-multiple-vulnerabilities-in-go-getter-library"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.hashicorp.com/t/hcsec-2022-13-multiple-vulnerabilities-in-go-getter-library/39930"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hashicorp/go-getter"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/go-getter/releases"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0586"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-01T21:21:26Z",
    "nvd_published_at" : "2022-05-25T12:15:00Z"
  }
}