CVE-2018-9057: Github.com/hashicorp/terraform provider aws HashiCorp Terraform Amazon Web Services Vulnerability

CRITICAL
Advisory Identifier: GHSA-r48h-jr2j-9g78
CVSS 9.8
CWE-332
Published
Advisory Summary

CVE-2018-9057 is a CRITICAL (CVSS 9.8) hashicorp terraform amazon web services vulnerability (CWE-332: Insufficient Entropy in PRNG) affecting Github.com/hashicorp/terraform provider aws libraries in the Go ecosystem. The issue involves hashicorp terraform amazon web services (aws) uses an insecure prng. Remediation is available by upgrading affected packages to version 1.14.0.

CVE-2018-9057 at a Glance

CVE Identifier CVE-2018-9057
GHSA Identifier GHSA-r48h-jr2j-9g78
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-332: Insufficient Entropy in PRNG
Affected Product Github.com/hashicorp/terraform provider aws
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2018-9057

To remediate this vulnerability, upgrade all affected Github.com/hashicorp/terraform provider aws 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/terraform-provider-aws fixed: 1.14.0
Upgrade github.com/hashicorp/terraform-provider-aws to 1.14.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/terraform-provider-aws

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-9057, inspect your project dependencies for Github.com/hashicorp/terraform provider aws:

inspect dependencies for github.com/hashicorp/terraform-provider-aws

Analyze the terminal output to locate any version of Github.com/hashicorp/terraform provider aws in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.14.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-332: Insufficient Entropy in PRNG, where the lack of entropy available for, or used by, a pseudo-random number generator (prng) can be a stability and security threat. In Github.com/hashicorp/terraform provider aws, 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

aws/resource_aws_iam_user_login_profile.go in the HashiCorp Terraform Amazon Web Services (AWS) provider through v1.12.0 has an inappropriate PRNG algorithm and seeding, which makes it easier for remote attackers to obtain access by leveraging an IAM account that was provisioned with a weak password.

CVE-2018-9057 Affected Github.com/hashicorp/terraform provider aws Versions

1 component(s)
Fixed Versions:
1.14.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/hashicorp/terraform-provider-aws
Go
< 1.14.0
1.14.0

References

Frequently Asked Questions

What is CVE-2018-9057?
CVE-2018-9057 is a security vulnerability in Github.com/hashicorp/terraform provider aws involving HashiCorp Terraform Amazon Web Services (AWS) uses an insecure PRNG under CWE-332: Insufficient Entropy in PRNG.
Which Github.com/hashicorp/terraform provider aws versions are affected?
Affected versions include releases prior to 1.14.0 across affected packages: github.com/hashicorp/terraform-provider-aws.
What version fixes CVE-2018-9057?
Upgrading to 1.14.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/hashicorp/terraform-provider-aws affected?
Yes, github.com/hashicorp/terraform-provider-aws is affected in releases prior to 1.14.0. Upgrade your dependency to 1.14.0 or later.
What is the CVSS score of CVE-2018-9057?
CVE-2018-9057 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-9057?
CVE-2018-9057 is classified under CWE-332: Insufficient Entropy in PRNG (The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat.).
How can I check Go dependencies for CVE-2018-9057?
Run the dependency tree command: 'inspect dependencies for github.com/hashicorp/terraform-provider-aws'. 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-r48h-jr2j-9g78",
  "modified" : "2024-02-21T23:19:35Z",
  "published" : "2022-05-14T03:29:43Z",
  "aliases" : [ "CVE-2018-9057" ],
  "summary" : " HashiCorp Terraform Amazon Web Services (AWS) uses an insecure PRNG ",
  "details" : "aws/resource_aws_iam_user_login_profile.go in the HashiCorp Terraform Amazon Web Services (AWS) provider through v1.12.0 has an inappropriate PRNG algorithm and seeding, which makes it easier for remote attackers to obtain access by leveraging an IAM account that was provisioned with a weak password.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/terraform-provider-aws"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.14.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-9057"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/terraform-provider-aws/pull/3934"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/terraform-provider-aws/pull/3989"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/terraform-providers/terraform-provider-aws/pull/3934"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/terraform-provider-aws/commit/efa8cd45c6484ff70b2a515ea7ff06f2459d4ddf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hashicorp/terraform-provider-aws"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hashicorp/terraform-provider-aws/blob/02b039aa82dd7fc6e4a97a0922cc5dbbab724021/resource_aws_iam_user_login_profile.go#L70-L80"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-332" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-21T23:19:35Z",
    "nvd_published_at" : "2018-03-27T18:29:00Z"
  }
}