CVE-2021-21334
environment variable leak
Also known as GHSA-6g2q-w5j3-fwh4
Mitigation
- Upgrade github.com/containerd/containerd to one of 1.4.4, 1.3.10 (or later in the same release line).
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
Vulnerability facts
- Affected
- github.com/containerd/containerd >= 1.4.0, < 1.4.4
- Fixed in
- 1.4.4, 1.3.10
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 6.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 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
- EPSS
- 1.95% chance of exploitation in 30 days (percentile 81, 2026-11-26)
- CWE
- CWE-668
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/containerd/containerd | >= 1.4.0, < 1.4.4 | 1.4.4, 1.3.10 | osv |
| containerd | < 1.3.10; >= 1.4.0, < 1.4.4 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
Vendor advisories
- https://github.com/containerd/containerd/security/advisories/GHSA-6g2q-w5j3-fwh4
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KUE2Z2ZUWBHRU36ZGBD2YSJCYB6ELPXE/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QIBPKSX5IOWPM3ZPFB3JVLXWDHSZTTWT/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VTXHA5JOWQRCCUZH7ZQBEYN6KZKJEYSD/
- https://security.gentoo.org/glsa/202105-33
- https://nvd.nist.gov/vuln/detail/CVE-2021-21334
Patches
- https://github.com/containerd/containerd/commit/05f951a3781f4f2c1911b05e61c160e9c30eaa8e
- https://github.com/containerd/cri/pull/1628
- https://github.com/containerd/cri/pull/1629
- https://github.com/containerd/containerd/commit/2d9c8aa4b3f4313982c5c999af57212a1c5d144b
- https://github.com/containerd/containerd/commit/cbcb2f57fbe221986f96b552855eb802f63193de
Other
- https://github.com/containerd/containerd/releases/tag/v1.4.4
- https://github.com/containerd/containerd/releases/tag/v1.3.10
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KUE2Z2ZUWBHRU36ZGBD2YSJCYB6ELPXE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QIBPKSX5IOWPM3ZPFB3JVLXWDHSZTTWT
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VTXHA5JOWQRCCUZH7ZQBEYN6KZKJEYSD
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.