# CVE-2021-21334: environment variable leak

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

- **Severity:** MEDIUM 6.3
- **CVSS:** 6.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.95% (percentile 81, 2026-11-26)
- **CWE:** CWE-668
- **Aliases:** GHSA-6g2q-w5j3-fwh4
- **Published:** 2021-03-10T21:30:18.000Z
- **Modified:** 2026-09-10T03:50:04.845Z

## Who should check

- Projects that depend on Go package github.com/containerd/containerd (\>= 1.4.0, \< 1.4.4)
- Anyone running containerd \< 1.3.10; \>= 1.4.0, \< 1.4.4

## Description

In containerd (an industry-standard container runtime) before versions 1.3.10 and 1.4.4, containers launched through containerd's CRI implementation (through Kubernetes, crictl, or any other pod/container client that uses the containerd CRI service) that share the same image may receive incorrect environment variables, including values that are defined for other containers. If the affected containers have different security contexts, this may allow sensitive information to be unintentionally shared. If you are not using containerd's CRI implementation (through one of the mechanisms described above), you are not vulnerable to this issue. If you are not launching multiple containers or Kubernetes pods from the same image which have different environment variables, you are not vulnerable to this issue. If you are not launching multiple containers or Kubernetes pods from the same image in rapid succession, you have reduced likelihood of being vulnerable to this issue This vulnerability has been fixed in containerd 1.3.10 and containerd 1.4.4. Users should update to these versions.

## Affected and fixed versions

- Go `github.com/containerd/containerd`: affected \>= 1.4.0, \< 1.4.4; fixed 1.4.4, 1.3.10 (osv)
- containerd: \< 1.3.10; \>= 1.4.0, \< 1.4.4 (cvelist)

## Mitigation

- Upgrade github.com/containerd/containerd to one of 1.4.4, 1.3.10 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2021-21334.md
Affected: github.com/containerd/containerd >= 1.4.0, < 1.4.4
Fixed in: 1.4.4, 1.3.10

Steps:
1. Search this machine and project for github.com/containerd/containerd (Go), containerd: 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-21334 being exploited?

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

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

Medium: CVSS 6.3 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

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

github.com/containerd/containerd \>= 1.4.0, \< 1.4.4.

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

Yes. Fixed in 1.4.4, 1.3.10. Upgrade github.com/containerd/containerd to one of 1.4.4, 1.3.10 (or later in the same release line).

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

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/containerd/containerd/security/advisories/GHSA-6g2q-w5j3-fwh4>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KUE2Z2ZUWBHRU36ZGBD2YSJCYB6ELPXE/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QIBPKSX5IOWPM3ZPFB3JVLXWDHSZTTWT/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VTXHA5JOWQRCCUZH7ZQBEYN6KZKJEYSD/>
- vendor: <https://security.gentoo.org/glsa/202105-33>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-21334>
- patch: <https://github.com/containerd/containerd/commit/05f951a3781f4f2c1911b05e61c160e9c30eaa8e>
- patch: <https://github.com/containerd/cri/pull/1628>
- patch: <https://github.com/containerd/cri/pull/1629>
- patch: <https://github.com/containerd/containerd/commit/2d9c8aa4b3f4313982c5c999af57212a1c5d144b>
- patch: <https://github.com/containerd/containerd/commit/cbcb2f57fbe221986f96b552855eb802f63193de>
- other: <https://github.com/containerd/containerd/releases/tag/v1.4.4>
- other: <https://github.com/containerd/containerd/releases/tag/v1.3.10>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KUE2Z2ZUWBHRU36ZGBD2YSJCYB6ELPXE>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QIBPKSX5IOWPM3ZPFB3JVLXWDHSZTTWT>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VTXHA5JOWQRCCUZH7ZQBEYN6KZKJEYSD>

## 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-21334>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-6g2q-w5j3-fwh4> (license: <https://creativecommons.org/licenses/by/4.0/>)

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