Bug 1848513 (CVE-2020-11013) - CVE-2020-11013 helm: information discolosure via the lookup function
Summary: CVE-2020-11013 helm: information discolosure via the lookup function
Alias: CVE-2020-11013
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1851813
Blocks: 1848514
TreeView+ depends on / blocked
Reported: 2020-06-18 13:26 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-12-15 02:46 UTC (History)
15 users (show)

Fixed In Version: helm 3.2.0
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in helm. The helm template lookup() function bypasses the intended security property that the running `helm template` will not attach to a helm cluster. This flaw allows a malicious template to disclose facts about the cluster without the administrator's consent.
Clone Of:
Last Closed: 2021-10-28 05:01:29 UTC

Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2020-06-18 13:26:54 UTC
Their is an information disclosure vulnerability in Helm from version 3.1.0 and before version 3.2.0. `lookup` is a Helm template function introduced in Helm v3. It is able to lookup resources in the cluster to check for the existence of specific resources and get details about them. This can be used as part of the process to render templates. The documented behavior of `helm template` states that it does not attach to a remote cluster. However, a the recently added `lookup` template function circumvents this restriction and connects to the cluster even during `helm template` and `helm install|update|delete|rollback --dry-run`. The user is not notified of this behavior. Running `helm template` should not make calls to a cluster. This is different from `install`, which is presumed to have access to a cluster in order to load resources into Kubernetes. Helm 2 is unaffected by this vulnerability. A malicious chart author could inject a `lookup` into a chart that, when rendered through `helm template`, performs unannounced lookups against the cluster a user's `KUBECONFIG` file points to. This information can then be disclosed via the output of `helm template`. This issue has been fixed in Helm 3.2.0


Comment 2 Doran Moppert 2020-07-03 02:20:07 UTC

Three mitigations are described in the Helm project's advisory.

Running `helm lint` will report an error if a template uses the lookup function; thus templates that pass `helm lint` can be used safely without triggering this vulnerability.

Setting `KUBECONFIG` to point to an empty kubernetes configuration file will prevent unintended network connections.

Manually analysing charts to ensure there is no use of the `lookup` function in the `templates/` directory can prove they are safe to use.

Note You need to log in before you can comment on or make changes to this bug.