Skip to content

GHSA-c72p-9xmj-rx3w CVE-2021-32760 GO-2022-0921

Archive package allows chmod of file outside of unpack target directory

Medium Go
Severity
5.0 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
1.59%
Chance of exploitation in the next 30 days. Higher than 75.73% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-668 Exposure of Resource to Wrong Sphere
CWE-732 Incorrect Permission Assignment for Critical Resource
Fix
1.4.8
Upgrade github.com/containerd/containerd to this version or later

Description

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:

Affected versions

Go

PackageVulnerableFixed in
github.com/containerd/containerd
< 1.4.8
1.4.8
github.com/containerd/containerd
>= 1.5.0, < 1.5.4
1.5.4
github.com/containerd/containerd
< 1.4.8
>= 1.5.0, < 1.5.4
1.4.8
1.5.4

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/containerd/containerd Go → 1.4.8

go
go get github.com/containerd/containerd@v1.4.8 && go mod tidy

Severity breakdown

CVSS 3.1 5.0

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

Weakness

CWE-668: Exposure of Resource to Wrong Sphere

The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.

CWE-732: Incorrect Permission Assignment for Critical Resource

The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.

How to prevent it
  • Implementation: When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user) [REF-62], and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.
  • Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources. [REF-207]
  • Architecture and Design, Operation: Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
  • Implementation, Installation: During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.
  • System Configuration: For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.
  • Documentation: Do not suggest insecure configuration changes in documentation, especially if those configurations can extend to resources and other programs that are outside the scope of the application.
  • Installation: Do not assume that a system administrator will manually change the configuration to the settings that are recommended in the software's manual.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
  • Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-rp3h-jf77-q9p4
containerd: Unpack DoS via repeated opaque whiteouts
Medium Also affects github.com/containerd/containerd
GO-2026-6791
containerd CRI plugin: Checkpoint restore bypasses destination security context
High Also affects github.com/containerd/containerd
GHSA-pg57-6jwg-q645
Containerd has image-pull DoS via crafted OCI index graph amplification
Medium Also affects github.com/containerd/containerd
GHSA-7jxh-36q5-gcqv
containerd: CRI ExecSync Goroutine Leak Leads to Node-Level Denial of Service
Medium Also affects github.com/containerd/containerd
GO-2026-5064
containerd CRI checkpoint restore CDI annotation smuggling
Critical Also affects github.com/containerd/containerd
GO-2026-5622
Arbitrary host CRI log file read via symlink following in CRI checkpoint restore
Medium Also affects github.com/containerd/containerd
GHSA-xhf5-7wjv-pqxp
containerd CRI — image-config `LABEL` flows to restart-monitor `binary://` logger: host-root command execution from an image pull
High Also affects github.com/containerd/containerd
GO-2026-5338
containerd: CRI checkpoint import allows local image tag poisoning
Critical Also affects github.com/containerd/containerd
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor