CVE-2021-21303 json
Injection attack in Helm
published 5y ago modified 2mo ago also BIT-helm-2021-21303 , EUVD-2021-1306 , GHSA-c38g-469g-cmgx , GO-2022-1040
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
Summary
Helm is open-source software which is essentially "The Kubernetes Package Manager". Helm is a tool for managing Charts. Charts are packages of pre-configured Kubernetes resources. In Helm from version 3.0 and before version 3.5.2, there a few cases where data loaded from potentially untrusted sources was not properly sanitized. When a SemVer in the `version` field of a chart is invalid, in some cases Helm allows the string to be used "as is" without sanitizing. Helm fails to properly sanitized some fields present on Helm repository `index.yaml` files. Helm does not properly sanitized some fields in the `plugin.yaml` file for plugins In some cases, Helm does not properly sanitize the fields in the `Chart.yaml` file. By exploiting these attack vectors, core maintainers were able to send deceptive information to a terminal screen running the `helm` command, as well as obscure or alter information on the screen. In some cases, we could send codes that terminals used to execute higher-order logic, like clearing a terminal screen. Further, during evaluation, the Helm maintainers discovered a few other fields that were not properly sanitized when read out of repository index files. This fix remedies all such cases, and once again enforces SemVer2 policies on version fields. All users of the Helm 3 should upgrade to the fixed version 3.5.2 or later. Those who use Helm as a library should verify that they either sanitize this data on their own, or use the proper Helm API calls to sanitize the data.
Patch / fix
- go helm.sh/helm/v3 3.5.2
- bitnami helm 3.5.2
- helm helm 3.5.2
- helm Alpine 3.24, Alpine 3.23, Alpine 3.22 +5 more 3.6.0-r0
alpine advisories ALPINE-CVE-2021-21303
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- helm CBL-Mariner 2.0 3.4.1-4
azure linux advisories AZL-6470
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- helm Arch Linux 3.5.2-1
arch linux advisories AVG-1539
Is CVE-2021-21303 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21303 updated cvss 6.8
helm: Unsanitized data displayed directly to user's terminal
-
Red Hat Advanced Cluster Management for Kubernetes 2 multicloudhub-repo, multicloud-operators-subscription, multicloud-operators-subscription-release Red Hat OpenStack Platform 16.2 osp-director-provisioner-container, rhosp-rhel8-tech-preview/osp-director-operator, rhosp-rhel8-tech-preview/osp-director-downloadernot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.09% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N |
| NVD | 3.1 | 6.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N |
| NVD | 2.0 | 3.5 | AV:N/AC:M/Au:S/C:N/I:P/A:N |
| OSV | 3.1 | 6.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | helm.sh/helm/v3 | >=3.0.0, <3.5.2 |
3.5.2 |
| bitnami | helm | >=3.0.0, <3.5.2 |
3.5.2 |
Affected products
- helm helm
Classification
- Weakness
-
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component
References
-
github.com
/helm/helm/commit/6ce9ba60b73013857e2e7c73d3f86ed70bc1ac9a
web, patch, third-party-advisory, advisory
-
github.com
/helm/helm/security/advisories/GHSA-c38g-469g-cmgx
web, third-party-advisory, advisory
-
github.com
/helm/helm/releases/tag/v3.5.2
web, release-notes, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21303
advisory, web
-
github.com
/advisories/GHSA-c38g-469g-cmgx
advisory
-
github.com
/helm/helm
package
-
pkg.go.dev
/vuln/GO-2022-1040
web
Sources
- CVE List CVE-2021-21303
- GitHub Advisory GHSA-c38g-469g-cmgx
- NVD CVE-2021-21303
- OSV BIT-helm-2021-21303
- OSV GO-2022-1040
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.