CVE-2021-32760: Archive package allows chmod of file outside of unpack target directory
Impact
A bug was found in containerd 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.
Patches
This bug has been fixed in containerd 1.5.4 and 1.4.8. Users should update to these versions as soon as they are released. Running containers do not need to be restarted.
Workarounds
Ensure you 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 unexpected files.
For more information
If you have any questions or comments about this advisory:
Open an issue Email us at security@containerd.io if you think you’ve found a security bug.
Other sources
A bug was found in containerd 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.
Upstream advisory:
https://github.com/containerd/containerd/security/advisories/GHSA-c72p-9xmj-rx3w
— Red Hat
A flaw was found in containerd 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.
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.
Affected Software
Event History
Frequently Asked Questions
What is CVE-2021-32760?
CVE-2021-32760 is a vulnerability 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.
What is the severity of CVE-2021-32760?
The severity of CVE-2021-32760 is medium with a CVSS score of 6.3.
How does CVE-2021-32760 affect containerd?
CVE-2021-32760 affects containerd versions prior to 1.4.8 and 1.5.4, potentially resulting in changes to file permissions that can deny access to existing files in the host's filesystem.
How can I fix CVE-2021-32760?
To fix CVE-2021-32760, it is recommended to upgrade to containerd version 1.4.8 or 1.5.4, depending on your current version.
Where can I find more information about CVE-2021-32760?
You can find more information about CVE-2021-32760 on the CVE website (https://www.cve.org/CVERecord?id=CVE-2021-32760) and the NIST NVD website (https://nvd.nist.gov/vuln/detail/CVE-2021-32760).