CVE-2021-43816
mediumpriority · track · 37EPSS 0.017 · 77 %ileDEEUUSEPSS · scored 2026-10-22
containerd is an open source container runtime. On installations using SELinux, such as EL8 (CentOS, RHEL), Fedora, or SUSE MicroOS, with containerd since v1.5.0-beta.0 as the backing container runtime interface (CRI), an unprivileged pod scheduled to the node may bind mount, via hostPath volume, any privileged, regular file on disk for complete read/write access (sans delete). Such is achieved by placing the in-container location of the hostPath volume mount at either `/etc/hosts`, `/etc/hostname`, or `/etc/resolv.conf`. These locations are being relabeled indiscriminately to match the container process-label which effectively elevates permissions for savvy containers that would not normally be able to access privileged host files. This issue has been resolved in version 1.5.9. Users are advised to upgrade as soon as possible.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–critical · 6–9.1
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (12)
Products and version ranges known to be affected.
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2022-0235Red Hat Advanced Cluster Management: Mehrere Schwachstellen ermöglichen PrivilegieneskalationDeutsch2022-03-03csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Red Hat Advanced Cluster Management ausnutzen, um seine Privilegien zu erhöhen.
- GHSA-mvff-h3cj-wj9cUnprivileged pod using `hostPath` can side-step active LSM when it is SELinux2022-01-06ghsa · osvUS
### Impact Containers launched through containerd’s CRI implementation on Linux systems which use the SELinux security module and containerd versions since v1.5.0 can cause arbitrary files and directories on the host to be relabeled to match the container process label through the use of specially-configured bind mounts in a hostPath volume. This relabeling elevates permissions for the container, granting full read/write access over the affected files and directories. Kubernetes and crictl can both be configured to use containerd’s CRI implementation. If you are not using containerd’s CRI implementation (through one of the mechanisms described above), you are not affected by this issue. ### Patches This bug has been fixed in containerd 1.5.9. Because file labels persist independently of containerd, users should both update to these versions as soon as they are released and validate that all files on their host are correctly labeled. ### Workarounds Ensure that no sensitive files or directories are used as a hostPath volume source location. Policy enforcement mechanisms such a Kubernetes Pod Security Policy [AllowedHostPaths](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems) may be specified to limit the files and directories that can be bind-mounted to containers. ### For more information If you have any questions or comments about this advisory: * Open an issue in [containerd](https://github.com/containerd/containerd/issues/new/choose) * Email us at [security@containerd.io](mailto:security@containerd.io)
- GO-2022-0278Unprivileged pod using `hostPath` can side-step active LSM when it is SELinux in github.com/containerd/containerd2024-08-21vendor · osvUS
Unprivileged pod using `hostPath` can side-step active LSM when it is SELinux in github.com/containerd/containerd
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (22)
External citations — patches, advisories, analysis.
- https://github.com/containerd/containerd/commit/a731039238c62be081eb8c31525b988415745eeacnnvd
- https://github.com/containerd/containerd/issues/6194cnnvd
- https://github.com/containerd/containerd/security/advisories/GHSA-mvff-h3cj-wj9ccnnvd
- https://github.com/dweomer/containerd/commit/f7f08f0e34fb97392b0d382e58916d6865100299cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GD5GH7NMK5VJMA2Y5CYB5O5GTPYMWMLX/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MPDIZMI7ZPERSZE2XO265UCK5IWM7CID/cnnvd
- https://packetstormsecurity.com/files/166199/Red-Hat-Security-Advisory-2022-0735-01.htmlcnnvd
- https://www.auscert.org.au/bulletins/ESB-2022.0903cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan