# CVE-2021-21303: Injection attack in Helm

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: None; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.09% (percentile 65, 2026-11-26)
- **CWE:** CWE-74
- **Aliases:** BIT-helm-2021-21303, GHSA-c38g-469g-cmgx, GO-2022-1040
- **Published:** 2021-02-05T21:40:14.000Z
- **Modified:** 2026-07-08T06:27:57.157Z

## Who should check

- Projects that depend on Go package helm.sh/helm/v3 (\>= 3.0.0, \< 3.5.2)
- Anyone running helm \> 3.0, \< 3.5.2

## Description

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.

## Affected and fixed versions

- Go `helm.sh/helm/v3`: affected \>= 3.0.0, \< 3.5.2; fixed 3.5.2 (osv)
- helm: \> 3.0, \< 3.5.2 (cvelist)

## Mitigation

- Upgrade helm.sh/helm/v3 to 3.5.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-21303. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-21303.md
Affected: helm.sh/helm/v3 >= 3.0.0, < 3.5.2
Fixed in: 3.5.2

Steps:
1. Search this machine and project for helm.sh/helm/v3 (Go), helm: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-21303 being exploited?

There is no confirmed exploitation: CVE-2021-21303 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.09% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-21303?

Medium: CVSS 5.9 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2021-21303?

helm.sh/helm/v3 \>= 3.0.0, \< 3.5.2.

### Is there a fix for CVE-2021-21303?

Yes. Fixed in 3.5.2. Upgrade helm.sh/helm/v3 to 3.5.2 or later.

### How do I check if I'm affected by CVE-2021-21303?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/helm/helm/security/advisories/GHSA-c38g-469g-cmgx>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-21303>
- vendor: <https://github.com/advisories/GHSA-c38g-469g-cmgx>
- patch: <https://github.com/helm/helm/commit/6ce9ba60b73013857e2e7c73d3f86ed70bc1ac9a>
- other: <https://github.com/helm/helm/releases/tag/v3.5.2>
- other: <https://github.com/helm/helm>
- other: <https://pkg.go.dev/vuln/GO-2022-1040>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-21303>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-c38g-469g-cmgx> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2022-1040> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-21303> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-21303>
