CVE-2021-32760
JSON

5.0medium

Archive package allows chmod of file outside of unpack target directory

Severity
5.0medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.59% (higher than 76% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-c72p-9xmj-rx3wGO-2022-0921

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

Product or packageVersionsReported by
containerd containerd<= 1.4.7, >= 1.5.0, <= 1.5.3CVE List
github.com/containerd/containerd (Go)before 1.4.8, from 1.5.0 before 1.5.4GitHub Advisory Database, Go Vulnerability Database
linuxfoundation containerdbefore 1.4.8, from 1.5.0 before 1.5.4NVD
fedoraproject fedora34NVD

All scores

GitHub_M5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
GitHub5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
NVD6.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

CWE-668CWE-732

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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:

Go Vulnerability Database

Archive package allows chmod of file outside of unpack target directory in github.com/containerd/containerd

NVD (es)

containerd es un tiempo de ejecución de contenedores. Se ha encontrado un bug en las versiones de containerd anteriores a 1.4.8 y la 1.5.4, donde tirando y extrayendo una imagen de contenedor especialmente diseñada puede resultar en cambios en los permisos de archivos Unix para los archivos existentes en el sistema de archivos del host. Los cambios en los permisos de los archivos pueden denegar el acceso al propietario esperado del archivo, ampliar el acceso a otros, o establecer bits extendidos como setuid, setgid y sticky. Este bug no permite directamente la lectura, modificación o ejecución de archivos sin un proceso adicional de cooperación. Este bug ha sido corregido en containerd versiones 1.5.4 y 1.4.8. Como solución, asegúrese de que los usuarios sólo obtienen imágenes de fuentes de confianza. Los módulos de seguridad de Linux (LSM) como SELinux y AppArmor pueden limitar los archivos potencialmente afectados por este bug mediante políticas y perfiles que impiden que containerd interactúe con archivos específicos

References

https://github.com/containerd/containerd/security/advisories/GHSA-c72p-9xmj-rx3wadvisory, third-party-advisory, web
https://github.com/containerd/containerd/releases/tag/v1.4.8release-notes, third-party-advisory, web
https://github.com/containerd/containerd/releases/tag/v1.5.4release-notes, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DDMNDPJJTP3J5GOEDB66F6MGXUTRG3Y3/vendor-advisory
https://security.gentoo.org/glsa/202401-31vendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-32760advisory
https://github.com/containerd/containerd/commit/22e9a70c71eff6507be71955947a611f2ed91e6cfix, web
https://github.com/containerd/containerd/commit/7ad08c69e09ee4930a48dbf2aab3cd612458617ffix, web
https://github.com/containerd/containerdpackage
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DDMNDPJJTP3J5GOEDB66F6MGXUTRG3Y3web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DDMNDPJJTP3J5GOEDB66F6MGXUTRG3Y3web

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-32760 changed 2024-11-19CVE Terms of Use
GitHub Advisory DatabaseGHSA-c72p-9xmj-rx3w changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0921 changed 2026-02-04CC-BY-4.0
NVDCVE-2021-32760 changed 2026-06-17Public domain