CVE-2024-26147: Helm.sh/helm/v3 Helm's Missing YAML Content Leads Vulnerability

HIGH
Advisory Identifier: GHSA-r53h-jv2g-vpx6
CVSS 7.5
CWE-457 CWE-908
Published
Advisory Summary

CVE-2024-26147 is a HIGH (CVSS 7.5) helm's missing yaml content leads vulnerability (CWE-457: Use of Uninitialized Variable) affecting Helm.sh/helm/v3 libraries in the Go ecosystem. The issue involves helm's missing yaml content leads to panic. Remediation is available by upgrading affected packages to version 3.14.2.

CVE-2024-26147 at a Glance

CVE Identifier CVE-2024-26147
GHSA Identifier GHSA-r53h-jv2g-vpx6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-457: Use of Uninitialized Variable
Affected Product Helm.sh/helm/v3
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-26147

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.14.2
Upgrade helm.sh/helm/v3 to 3.14.2
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-2024-26147, 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.14.2), 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-457: Use of Uninitialized Variable, where the code uses a variable that has not been initialized, leading to unpredictable or unintended results. 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

A Helm contributor discovered uninitialized variable vulnerability when Helm parses index and plugin yaml files missing expected content. ### Impact When either an `index.yaml` file or a plugins `plugin.yaml` file were missing all metadata a panic would occur in Helm. In the Helm SDK this is found when using the `LoadIndexFile` or `DownloadIndexFile` functions in the `repo` package or the `LoadDir` function in the `plugin` package. For the Helm client this impacts functions around adding a repository and all Helm functions if a malicious plugin is added as Helm inspects all known plugins on each invocation. ### Patches This issue has been resolved in Helm v3.14.2. ### Workarounds If a malicious plugin has been added which is causing all Helm client commands to panic, the malicious plugin can be manually removed from the filesystem. If using Helm SDK versions prior to 3.14.2, calls to affected functions can use `recover` to catch the panic. ### 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. ### Credits Disclosed by Jakub Ciolek at AlphaSense.

CVE-2024-26147 Affected Helm.sh/helm/v3 Versions

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

References

Frequently Asked Questions

What is CVE-2024-26147?
CVE-2024-26147 is a security vulnerability in Helm.sh/helm/v3 involving Helm's Missing YAML Content Leads To Panic under CWE-457: Use of Uninitialized Variable.
Which Helm.sh/helm/v3 versions are affected?
Affected versions include releases prior to 3.14.2 across affected packages: helm.sh/helm/v3.
What version fixes CVE-2024-26147?
Upgrading to 3.14.2 (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.14.2. Upgrade your dependency to 3.14.2 or later.
What is the CVSS score of CVE-2024-26147?
CVE-2024-26147 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-26147?
CVE-2024-26147 is classified under CWE-457: Use of Uninitialized Variable (The code uses a variable that has not been initialized, leading to unpredictable or unintended results.).
How can I check Go dependencies for CVE-2024-26147?
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-r53h-jv2g-vpx6",
  "modified" : "2024-07-08T12:59:50Z",
  "published" : "2024-02-22T19:34:47Z",
  "aliases" : [ "CVE-2024-26147" ],
  "summary" : "Helm's Missing YAML Content Leads To Panic",
  "details" : "A Helm contributor discovered uninitialized variable vulnerability when Helm parses index and plugin yaml files missing expected content.\n\n### Impact\n\nWhen either an `index.yaml` file or a plugins `plugin.yaml` file were missing all metadata a panic would occur in Helm.\n\nIn the Helm SDK this is found when using the `LoadIndexFile` or `DownloadIndexFile` functions in the `repo` package or the `LoadDir` function in the `plugin` package. For the Helm client this impacts functions around adding a repository and all Helm functions if a malicious plugin is added as Helm inspects all known plugins on each invocation.\n\n### Patches\n\nThis issue has been resolved in Helm v3.14.2.\n\n### Workarounds\n\nIf a malicious plugin has been added which is causing all Helm client commands to panic, the malicious plugin can be manually removed from the filesystem.\n\nIf using Helm SDK versions prior to 3.14.2, calls to affected functions can use `recover` to catch the panic.\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\n### Credits\n\nDisclosed by Jakub Ciolek at AlphaSense.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "helm.sh/helm/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.14.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/helm/helm/security/advisories/GHSA-r53h-jv2g-vpx6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-26147"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/helm/helm/commit/bb4cc9125503a923afb7988f3eb478722a8580af"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/helm/helm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-457", "CWE-908" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-22T19:34:47Z",
    "nvd_published_at" : "2024-02-21T23:15:08Z"
  }
}