CVE-2021-41103: Github.com/containerd/containerd Insufficiently Restricted Permissions On Plugin Vulnerability
MODERATECVE-2021-41103 is a MODERATE (CVSS 5.9) insufficiently restricted permissions on plugin vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/containerd/containerd libraries in the Go ecosystem. The issue involves insufficiently restricted permissions on plugin directories. Remediation is available by upgrading affected packages to version 1.4.11, 1.5.7.
CVE-2021-41103 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2021-41103
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.11
Upgrade github.com/containerd/containerd to 1.5.7
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-41103, 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.11), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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-41103 Affected Github.com/containerd/containerd Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/containerd/containerd
|
Go |
< 1.4.11
|
1.4.11
|
|
github.com/containerd/containerd
|
Go |
≥ 1.5.0
< 1.5.7
|
1.5.7
|
References
Frequently Asked Questions
What is CVE-2021-41103?
Which Github.com/containerd/containerd versions are affected?
What version fixes CVE-2021-41103?
Is github.com/containerd/containerd affected?
What is the CVSS score of CVE-2021-41103?
What CWE is associated with CVE-2021-41103?
How can I check Go dependencies for CVE-2021-41103?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c2h3-6mxw-7mvq",
"modified" : "2021-10-15T17:31:03Z",
"published" : "2021-10-04T20:14:47Z",
"aliases" : [ "CVE-2021-41103" ],
"summary" : "Insufficiently restricted permissions on plugin directories",
"details" : "### Impact\nA bug was found in containerd where container root directories and some plugins had insufficiently restricted permissions, allowing otherwise unprivileged Linux users to traverse directory contents and execute programs. When containers included executable programs with extended permission bits (such as setuid), unprivileged Linux users could discover and execute those programs. When the UID of an unprivileged Linux user on the host collided with the file owner or group inside a container, the unprivileged Linux user on the host could discover, read, and modify those files.\n\n### Patches\nThis vulnerability has been fixed in containerd 1.4.11 and containerd 1.5.7. Users should update to these version when they are released and may restart containers or update directory permissions to mitigate the vulnerability.\n\n### Workarounds\nLimit access to the host to trusted users. Update directory permission on container bundles directories. \n\n### For more information\nIf you have any questions or comments about this advisory: \n* Open an issue in [github.com/containerd/containerd](https://github.com/containerd/containerd/issues/new/choose)\n* Email us at [security@containerd.io](mailto:security@containerd.io)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:N/UI:N/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.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containerd/containerd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.5.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/security/advisories/GHSA-c2h3-6mxw-7mvq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41103"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/commit/5b46e404f6b9f661a205e28d59c982d3634148f8"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/containerd/containerd"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/releases/tag/v1.4.11"
}, {
"type" : "WEB",
"url" : "https://github.com/containerd/containerd/releases/tag/v1.5.7"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202401-31"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2021/dsa-5002"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-04T17:05:03Z",
"nvd_published_at" : "2021-10-04T17:15:00Z"
}
}