Vulnerability · Published Jul 19, 2021 · Assigned by GitHub_M

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

Medium 5.0

In plain English

A medium-severity security flaw in containerd from containerd. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.6% (higher than 76% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.0Medium
Exploit odds (30 days)1.6%top 24.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20containerd1.5.4-r0ALPINE-CVE-2021-32760
Alpine:v3.21containerd1.5.4-r0ALPINE-CVE-2021-32760
Alpine:v3.22containerd1.5.4-r0ALPINE-CVE-2021-32760
Alpine:v3.23containerd1.5.4-r0ALPINE-CVE-2021-32760
Alpine:v3.24containerd1.5.4-r0ALPINE-CVE-2021-32760
Debian:12containerd1.4.5~ds1-2DEBIAN-CVE-2021-32760
Debian:13containerd1.4.5~ds1-2DEBIAN-CVE-2021-32760
Debian:14containerd1.4.5~ds1-2DEBIAN-CVE-2021-32760
Gogithub.com/containerd/containerd1.4.8, 1.5.4GO-2022-0921
Gogithub.com/containerd/containerd1.5.4GHSA-c72p-9xmj-rx3w
Gogithub.com/containerd/containerd1.4.8GHSA-c72p-9xmj-rx3w

Affected products (as reported)

VendorProductVersions
containerd containerd <= 1.4.7>= 1.5.0, <= 1.5.3

Weakness: CWE-668 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

References