CVE-2021-32690: Helm.sh/helm/v3 Helm Passes Repository Credentials To Vulnerability

MODERATE
Advisory Identifier: GHSA-56hp-xqp3-w2jf
CWE-200
Published
Advisory Summary

CVE-2021-32690 is a MODERATE helm passes repository credentials to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Helm.sh/helm/v3 libraries in the Go ecosystem. The issue involves helm passes repository credentials to alternate domain. Remediation is available by upgrading affected packages to version 3.6.1.

CVE-2021-32690 at a Glance

CVE Identifier CVE-2021-32690
GHSA Identifier GHSA-56hp-xqp3-w2jf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Helm.sh/helm/v3
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2021-32690

To remediate this vulnerability, upgrade all affected Helm.sh/helm/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

helm.sh/helm/v3 fixed: 3.6.1
Upgrade helm.sh/helm/v3 to 3.6.1
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 helm.sh/helm/v3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-32690, inspect your project dependencies for Helm.sh/helm/v3:

inspect dependencies for helm.sh/helm/v3

Analyze the terminal output to locate any version of Helm.sh/helm/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.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 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Helm.sh/helm/v3, 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

While working on the Helm source, a Helm core maintainer discovered a situation where the username and password credentials associated with a Helm repository could be passed on to another domain referenced by that Helm repository. ### Impact The `index.yaml` within a Helm chart repository contains a reference where to get the chart archive for each version of a chart. The reference can be relative to the `index.yaml` file or a URL to location. The URL can point to any domain and this is a feature leveraged by Helm users. For example, an `index.yaml` file can be hosted on GitHub pages while the chart archives are hosted as GitHub releases. These are on different domain names and the `index.yaml` file points to the other domain. When a username and password were associated with a Helm repository the username and password were also passed on to other domains referenced in the `index.yaml` file. This occurred when Helm went to retrieve a specific chart archive on the other domain. ### Patches This issue has been resolved in 3.6.1. There is a slight behavior change to credential handling with regard to repositories. Usernames and passwords are only passed to the URL location of the Helm repository by default. The username and password are scoped to the scheme, host, and port of the Helm repository. To pass the username and password to other domains Helm may encounter when it goes to retrieve a chart, the new `--pass-credentials` flag can be used. This flag restores the old behavior for a single repository as an opt-in behavior. ### Workarounds If you use a username and password for a Helm repository you can audit the Helm repository in order to check for another domain being used that could have received the credentials. In the `index.yaml` file for that repository, look for another domain in the `urls` list for the chart versions. If there is another domain found and that chart version was pulled or installed the credentials would have been passed on. ### For more information Helm's security policy is spelled out in detail in our [SECURITY](https://github.com/helm/community/blob/master/SECURITY.md) document.

CVE-2021-32690 Affected Helm.sh/helm/v3 Versions

1 component(s)
Fixed Versions:
3.6.1
Product / Package Ecosystem Affected Versions Fixed Version
helm.sh/helm/v3
Go
< 3.6.1
3.6.1

References

Frequently Asked Questions

What is CVE-2021-32690?
CVE-2021-32690 is a security vulnerability in Helm.sh/helm/v3 involving Helm passes repository credentials to alternate domain under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Helm.sh/helm/v3 versions are affected?
Affected versions include releases prior to 3.6.1 across affected packages: helm.sh/helm/v3.
What version fixes CVE-2021-32690?
Upgrading to 3.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is helm.sh/helm/v3 affected?
Yes, helm.sh/helm/v3 is affected in releases prior to 3.6.1. Upgrade your dependency to 3.6.1 or later.
What CWE is associated with CVE-2021-32690?
CVE-2021-32690 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Go dependencies for CVE-2021-32690?
Run the dependency tree command: 'inspect dependencies for helm.sh/helm/v3'. 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-56hp-xqp3-w2jf",
  "modified" : "2024-05-20T21:31:06Z",
  "published" : "2021-06-23T18:14:15Z",
  "aliases" : [ "CVE-2021-32690" ],
  "summary" : "Helm passes repository credentials to alternate domain",
  "details" : "While working on the Helm source, a Helm core maintainer discovered a situation where the username and password credentials associated with a Helm repository could be passed on to another domain referenced by that Helm repository.\n\n### Impact\n\nThe `index.yaml` within a Helm chart repository contains a reference where to get the chart archive for each version of a chart. The reference can be relative to the `index.yaml` file or a URL to location. The URL can point to any domain and this is a feature leveraged by Helm users. For example, an `index.yaml` file can be hosted on GitHub pages while the chart archives are hosted as GitHub releases. These are on different domain names and the `index.yaml` file points to the other domain.\n\nWhen a username and password were associated with a Helm repository the username and password were also passed on to other domains referenced in the `index.yaml` file. This occurred when Helm went to retrieve a specific chart archive on the other domain.\n\n### Patches\n\nThis issue has been resolved in 3.6.1.\n\nThere is a slight behavior change to credential handling with regard to repositories. Usernames and passwords are only passed to the URL location of the Helm repository by default. The username and password are scoped to the scheme, host, and port of the Helm repository. To pass the username and password to other domains Helm may encounter when it goes to retrieve a chart, the new `--pass-credentials` flag can be used. This flag restores the old behavior for a single repository as an opt-in behavior.\n\n### Workarounds\n\nIf you use a username and password for a Helm repository you can audit the Helm repository in order to check for another domain being used that could have received the credentials. In the `index.yaml` file for that repository, look for another domain in the `urls` list for the chart versions. If there is another domain found and that chart version was pulled or installed the credentials would have been passed on.\n\n### For more information\n\nHelm's security policy is spelled out in detail in our [SECURITY](https://github.com/helm/community/blob/master/SECURITY.md) document.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "helm.sh/helm/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/helm/helm/security/advisories/GHSA-56hp-xqp3-w2jf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32690"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/helm/helm/commit/61d8e8c4a6f95540c15c6a65f36a6dd0a45e7a2f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/helm/helm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/helm/helm/releases/tag/v3.6.1"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0384"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-16T19:43:50Z",
    "nvd_published_at" : null
  }
}