CVE-2021-32760: Github.com/containerd/containerd Archive Package Allows Chmod Of Vulnerability
MODERATECVE-2021-32760 is a MODERATE (CVSS 5.0) archive package allows chmod of vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Github.com/containerd/containerd libraries in the Go ecosystem. The issue involves archive package allows chmod of file outside of unpack target directory. Remediation is available by upgrading affected packages to version 1.4.8, 1.5.4.
CVE-2021-32760 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2021-32760
To remediate this vulnerability, upgrade all affected Github.com/containerd/containerd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/containerd/containerd to 1.4.8
Upgrade github.com/containerd/containerd to 1.5.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/containerd/containerd
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-32760, inspect your project dependencies for Github.com/containerd/containerd:
inspect dependencies for github.com/containerd/containerd
Analyze the terminal output to locate any version of Github.com/containerd/containerd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Github.com/containerd/containerd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-32760 Affected Github.com/containerd/containerd Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/containerd/containerd
|
Go |
< 1.4.8
|
1.4.8
|
|
github.com/containerd/containerd
|
Go |
≥ 1.5.0
< 1.5.4
|
1.5.4
|
References
Frequently Asked Questions
What is CVE-2021-32760?
Which Github.com/containerd/containerd versions are affected?
What version fixes CVE-2021-32760?
Is github.com/containerd/containerd affected?
What is the CVSS score of CVE-2021-32760?
What CWE is associated with CVE-2021-32760?
How can I check Go dependencies for CVE-2021-32760?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c72p-9xmj-rx3w",
"modified" : "2024-01-31T15:31:56Z",
"published" : "2021-07-26T21:17:45Z",
"aliases" : [ "CVE-2021-32760" ],
"summary" : "Archive package allows chmod of file outside of unpack target directory",
"details" : "## Impact\n\nA 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.\n\n## Patches\n\nThis 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.\n\n## Workarounds\n\nEnsure you only pull images from trusted sources.\n\nLinux 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.\n\n## For more information\n\nIf you have any questions or comments about this advisory:\n\n* [Open an issue](https://github.com/containerd/containerd/issues/new/choose)\n* Email us at security@containerd.io if you think you’ve found a security bug.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containerd/containerd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containerd/containerd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.5.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/security/advisories/GHSA-c72p-9xmj-rx3w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32760"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/commit/22e9a70c71eff6507be71955947a611f2ed91e6c"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/commit/7ad08c69e09ee4930a48dbf2aab3cd612458617f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/containerd/containerd"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/releases/tag/v1.4.8"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/releases/tag/v1.5.4"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DDMNDPJJTP3J5GOEDB66F6MGXUTRG3Y3"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DDMNDPJJTP3J5GOEDB66F6MGXUTRG3Y3"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202401-31"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-668", "CWE-732" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-07-22T20:21:14Z",
"nvd_published_at" : "2021-07-19T21:15:00Z"
}
}