n/a · Vulnerability
cve-program · CVE-2021-30465
Publishedrunc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a symlink-exchange attack that relies on a race condition.
Read the publisher's advisoryeuvd · EUVD-2021-1034
Publishedrunc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a symlink-exchange attack that relies on a race condition.
Read the publisher's advisorynvd · CVE-2021-30465
Publishedrunc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a symlink-exchange attack that relies on a race condition.
Read the publisher's advisoryosv · GHSA-c3xm-pvg7-gh7r
Published### Summary runc 1.0.0-rc94 and earlier are vulnerable to a symlink exchange attack whereby an attacker can request a seemingly-innocuous container configuration that actually results in the host filesystem being bind-mounted into the container (allowing for a container escape). CVE-2021-30465 has been assigned for this issue. An attacker must have the ability to start containers using some kind of custom volume configuration, and while recommended container hardening mechanisms such as LSMs (AppArmor/SELinux) and user namespaces will restrict the amount of damage an attacker could do, they do not block this attack outright. We have a reproducer using Kubernetes (and the below description mentions Kubernetes-specific paths), but this is not a Kubernetes-specific issue. The now-released [runc v1.0.0-rc95][release] contains a fix for this issue, we recommend users update as soon as possible. [release]: https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc95 ### Details In circumstances where a container is being started, and runc is mounting inside a volume shared with another container (which is conducting a symlink-exchange attack), runc can be tricked into mounting outside of the container rootfs by swapping the target of a mount with a symlink due to a time-of-check-to-time-of-use (TOCTTOU) flaw. This is fairly similar in style to previous TOCTTOU attacks (and is a problem we are working on solving with libpathrs). However, this alone is not useful because this happens inside a mount namespace with `MS_SLAVE` propagation applied to `/` (meaning that the mount doesn't appear on the host -- it's only a "host-side mount" inside the container's namespace). To exploit this, you must have additional mount entries in the configuration that use some subpath of the mounted-over host path as a source for a subsequent mount. However, it turns out with some container orchestrators (such as Kubernetes -- though it is very likely that other downstream users of runc could have similar behaviour be accessible to untrusted users), the existence of additional volume management infrastructure allows this attack to be applied to gain access to the host filesystem without requiring the attacker to have completely arbitrary control over container configuration. In the case of Kubernetes, this is exploitable by creating a symlink in a volume to the top-level (well-known) directory where volumes are sourced from (for instance, `/var/lib/kubelet/pods/$MY_POD_UID/volumes/kubernetes.io~empty-dir`), and then using that symlink as the target of a mount. The source of the mount is an attacker controlled directory, and thus the source directory from which subsequent mounts will occur is an attacker-controlled directory. Thus the attacker can first place a symlink to `/` in their malicious source directory with the name of a volume, and a subsequent mount in the container will bind-mount `/` into the container. Applying this attack requires the attacker to start containers with a slightly peculiar volume configuration (though not explicitly malicious-looking such as bind-mounting `/` into the container explicitly), and be able to run malicious code in a container that shares volumes with said volume configuration. It helps the attacker if the host paths used for volume management are well known, though this is not a hard requirement. ### Patches This has been patched in runc 1.0.0-rc95, and users should upgrade as soon as possible. The patch itself can be found [here](https://github.com/opencontainers/runc/commit/0ca91f44f1664da834bc61115a849b56d22f595f). ### Workarounds There are no known workarounds for this issue. However, users who enforce running containers with more confined security profiles (such as reduced capabilities, not running code as root in the container, user namespaces, AppArmor/SELinux, and seccomp) will restrict what an attacker can do in the case of a container breakout -- we recommend users make use of strict security profiles if possible (most notably user namespaces -- which can massively restrict the impact a container breakout can have on the host system). ### References * [commit](https://github.com/opencontainers/runc/commit/0ca91f44f1664da834bc61115a849b56d22f595f) * [seclists public disclosure](https://www.openwall.com/lists/oss-security/2021/05/19/2) ### Credit Thanks to Etienne Champetier for discovering and disclosing this vulnerability, to Noah Meyerhans for writing the first draft of this patch, and to Samuel Karp for testing it. ### For more information If you have any questions or comments about this advisory: * Open an issue in [our issue tracker](https://github.com/opencontainers/runc/issues). * Email us at <[email protected]>.
Read the publisher's advisoryosv · GO-2022-0914
PublishedMount destinations can be swapped via symlink-exchange to cause mounts outside the rootfs in github.com/opencontainers/runc
Read the publisher's advisoryAffected versions, risk and source history
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2021-30465
Publishedrunc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a…
runc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a symlink-exchange attack that relies on a race condition.
- Source published
- 27 May 2021 00:00:00 UTC
- Source modified
- 3 Aug 2024 22:32:40 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
euvd · EUVD-2021-1034
Publishedrunc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a…
runc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a symlink-exchange attack that relies on a race condition.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: May 27, 2021, 12:00:00 AM
dateUpdated: Aug 3, 2024, 10:32:40 PM
22 related source bulletins · separate from aliases
RHSA-2021:2370: security update for buildah
CVE-2021-30465
RHSA-2021:2371: security update for buildah
CVE-2021-30465
openSUSE-SU-2025:15424-1: govulncheck-vulndb-0.0.20250807T150727-1.1 on GA media
CVE-2015-7561 · CVE-2016-9962 · CVE-2017-1000056 · CVE-2017-1002102 · CVE-2018-1002100 · CVE-2018-1002101 · CVE-2018-16733 · CVE-2018-19184 · CVE-2019-1002100 · CVE-2019-1002101 · CVE-2019-11245 · CVE-2019-11251 · CVE-2019-11253 · CVE-2020-26240 · CVE-2020-26241 · CVE-2020-8551 · CVE-2020-8555 · CVE-2020-8557 · CVE-2020-8558 · CVE-2020-8562 · CVE-2020-8563 · CVE-2020-8566 · CVE-2021-25735 · CVE-2021-25736 · CVE-2021-25737 · CVE-2021-25741 · CVE-2021-25743 · CVE-2021-30465 · CVE-2022-29162 · CVE-2022-29177 · CVE-2022-3162 · CVE-2022-3294 · CVE-2023-2431 · CVE-2023-25809 · CVE-2023-2727 · CVE-2023-2728 · CVE-2023-27561 · CVE-2023-28642 · CVE-2023-5528 · CVE-2024-45310 · CVE-2024-5321 · CVE-2025-3445 · CVE-2025-47907 · CVE-2025-47908
RHSA-2021:2145: Red Hat Security Advisory: runc security update
CVE-2021-30465
SUSE-SU-2021:3336-1: Security update for containerd, docker, runc
CVE-2021-30465 · CVE-2021-32760 · CVE-2021-41089 · CVE-2021-41091 · CVE-2021-41092 · CVE-2021-41103
RHSA-2021:2291: security update for buildah
CVE-2021-30465
RHSA-2021:1566: Red Hat Security Advisory: OpenShift Container Platform 4.6.30 packages and security update
CVE-2021-30465
openSUSE-SU-2021:1954-1: Security update for containerd, docker, runc
CVE-2021-21284 · CVE-2021-21285 · CVE-2021-21334 · CVE-2021-30465
openSUSE-SU-2024:11358-1: runc-1.0.2-1.2 on GA media
CVE-2016-9962 · CVE-2018-16873 · CVE-2018-16874 · CVE-2018-16875 · CVE-2019-16884 · CVE-2019-19921 · CVE-2019-5736 · CVE-2021-30465
openSUSE-SU-2021:3506-1: Security update for containerd, docker, runc
CVE-2021-30465 · CVE-2021-32760 · CVE-2021-41089 · CVE-2021-41091 · CVE-2021-41092 · CVE-2021-41103
RHSA-2021:2437: Red Hat Security Advisory: OpenShift Container Platform 4.8.2 packages and security update
CVE-2021-3114 · CVE-2021-3121 · CVE-2021-3636 · CVE-2021-20291 · CVE-2021-21419 · CVE-2021-21602 · CVE-2021-21603 · CVE-2021-21604 · CVE-2021-21605 · CVE-2021-21606 · CVE-2021-21607 · CVE-2021-21608 · CVE-2021-21609 · CVE-2021-21610 · CVE-2021-21611 · CVE-2021-21623 · CVE-2021-21639 · CVE-2021-21640 · CVE-2021-21642 · CVE-2021-21643 · CVE-2021-21644 · CVE-2021-21645 · CVE-2021-21648 · CVE-2021-25735 · CVE-2021-25737 · CVE-2021-30465
RHSA-2021:1562: Red Hat Security Advisory: OpenShift Container Platform 4.7.12 packages and security update
CVE-2021-3114 · CVE-2021-30465
SUSE-SU-2021:3506-1: Security update for containerd, docker, runc
CVE-2021-30465 · CVE-2021-32760 · CVE-2021-41089 · CVE-2021-41091 · CVE-2021-41092 · CVE-2021-41103
RHSA-2021:2057: Red Hat Security Advisory: OpenShift Container Platform 4.5.40 security and bug fix update
CVE-2021-30465
RHSA-2021:2292: Red Hat Security Advisory: container-tools:2.0 security update
CVE-2021-30465
SUSE-SU-2021:1954-1: Security update for containerd, docker, runc
CVE-2021-21284 · CVE-2021-21285 · CVE-2021-21334 · CVE-2021-30465
WID-SEC-W-2022-2048: Red Hat OpenShift: Schwachstelle gefährdet Vertraulichkeit, Verfügbarkeit und Integrität
CVE-2021-30465
openSUSE-SU-2021:0878-1: Security update for containerd, docker, runc
CVE-2021-21284 · CVE-2021-21285 · CVE-2021-21334 · CVE-2021-30465
RHSA-2021:2150: Red Hat Security Advisory: OpenShift Container Platform 3.11.452 bug fix and security update
CVE-2021-30465
RHSA-2021:2144: Red Hat Security Advisory: docker security update
CVE-2021-30465
SUSE-SU-2021:1885-1: Security update for runc
CVE-2021-30465
openSUSE-SU-2021:1404-1: Security update for containerd, docker, runc
CVE-2021-30465 · CVE-2021-32760 · CVE-2021-41089 · CVE-2021-41091 · CVE-2021-41092 · CVE-2021-41103
- Source published
- May 27, 2021, 12:00:00 AM (timezone not stated)
- Source modified
- Aug 3, 2024, 10:32:40 PM (timezone not stated)
- Saved here
- 18 Nov 2026 00:37:40 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
nvd · CVE-2021-30465
Publishedrunc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a…
runc before 1.0.0-rc95 allows a Container Filesystem Breakout via Directory Traversal. To exploit the vulnerability, an attacker must be able to create multiple containers with a fairly specific mount configuration. The problem occurs via a symlink-exchange attack that relies on a race condition.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-362
Original publisher date fields
published: 2021-05-27T13:15:08.077
lastModified: 2026-06-17T03:50:17.630
18 source CPE criteria · context only
- cpe:2.3:a:linuxfoundation:runc:*:*:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc1:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc10:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc2:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc3:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc4:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc5:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc6:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc7:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc8:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc9:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc90:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc91:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc92:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc93:*:*:*:*:*:*
- cpe:2.3:a:linuxfoundation:runc:1.0.0:rc94:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 27 May 2021 13:15:08 UTC
- Source modified
- 17 Jun 2026 03:50:17 UTC
- Saved here
- 24 Oct 2026 18:17:28 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Primary · 8.5 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS 2.0 · [email protected] · Primary · 6.0 AV:N/AC:M/Au:S/C:P/I:P/A:P
osv · GHSA-c3xm-pvg7-gh7r
Publishedmount destinations can be swapped via symlink-exchange to cause mounts outside the rootfs
### Summary runc 1.0.0-rc94 and earlier are vulnerable to a symlink exchange attack whereby an attacker can request a seemingly-innocuous container configuration that actually results in the host filesystem being bind-mounted into the container (allowing for a container escape). CVE-2021-30465 has been assigned for this issue. An attacker must have the ability to start containers using some kind of custom volume configuration, and while recommended container hardening mechanisms such as LSMs (AppArmor/SELinux) and user namespaces will restrict the amount of damage an attacker could do, they do not block this attack outright. We have a reproducer using Kubernetes (and the below description mentions Kubernetes-specific paths), but this is not a Kubernetes-specific issue. The now-released [runc v1.0.0-rc95][release] contains a fix for this issue, we recommend users update as soon as possible. [release]: https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc95 ### Details In circumstances where a container is being started, and runc is mounting inside a volume shared with another container (which is conducting a symlink-exchange attack), runc can be tricked into mounting outside of the container rootfs by swapping the target of a mount with a symlink due to a time-of-check-to-time-of-use (TOCTTOU) flaw. This is fairly similar in style to previous TOCTTOU attacks (and is a problem we are working on solving with libpathrs). However, this alone is not useful because this happens inside a mount namespace with `MS_SLAVE` propagation applied to `/` (meaning that the mount doesn't appear on the host -- it's only a "host-side mount" inside the container's namespace). To exploit this, you must have additional mount entries in the configuration that use some subpath of the mounted-over host path as a source for a subsequent mount. However, it turns out with some container orchestrators (such as Kubernetes -- though it is very likely that other downstream users of runc could have similar behaviour be accessible to untrusted users), the existence of additional volume management infrastructure allows this attack to be applied to gain access to the host filesystem without requiring the attacker to have completely arbitrary control over container configuration. In the case of Kubernetes, this is exploitable by creating a symlink in a volume to the top-level (well-known) directory where volumes are sourced from (for instance, `/var/lib/kubelet/pods/$MY_POD_UID/volumes/kubernetes.io~empty-dir`), and then using that symlink as the target of a mount. The source of the mount is an attacker controlled directory, and thus the source directory from which subsequent mounts will occur is an attacker-controlled directory. Thus the attacker can first place a symlink to `/` in their malicious source directory with the name of a volume, and a subsequent mount in the container will bind-mount `/` into the container. Applying this attack requires the attacker to start containers with a slightly peculiar volume configuration (though not explicitly malicious-looking such as bind-mounting `/` into the container explicitly), and be able to run malicious code in a container that shares volumes with said volume configuration. It helps the attacker if the host paths used for volume management are well known, though this is not a hard requirement. ### Patches This has been patched in runc 1.0.0-rc95, and users should upgrade as soon as possible. The patch itself can be found [here](https://github.com/opencontainers/runc/commit/0ca91f44f1664da834bc61115a849b56d22f595f). ### Workarounds There are no known workarounds for this issue. However, users who enforce running containers with more confined security profiles (such as reduced capabilities, not running code as root in the container, user namespaces, AppArmor/SELinux, and seccomp) will restrict what an attacker can do in the case of a container breakout -- we recommend users make use of strict security profiles if possible (most notably user namespaces -- which can massively restrict the impact a container breakout can have on the host system). ### References * [commit](https://github.com/opencontainers/runc/commit/0ca91f44f1664da834bc61115a849b56d22f595f) * [seclists public disclosure](https://www.openwall.com/lists/oss-security/2021/05/19/2) ### Credit Thanks to Etienne Champetier for discovering and disclosing this vulnerability, to Noah Meyerhans for writing the first draft of this patch, and to Samuel Karp for testing it. ### For more information If you have any questions or comments about this advisory: * Open an issue in [our issue tracker](https://github.com/opencontainers/runc/issues). * Email us at <[email protected]>.
- Source published
- 25 May 2021 18:44:42 UTC
- Source modified
- 10 Sep 2026 03:49:14 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
Publisher rating · HIGH
osv · GO-2022-0914
PublishedMount destinations can be swapped via symlink-exchange to cause mounts outside the rootfs in github.com/opencontainers/runc
Mount destinations can be swapped via symlink-exchange to cause mounts outside the rootfs in github.com/opencontainers/runc
- Source published
- 21 Aug 2024 15:29:08 UTC
- Source modified
- 4 Feb 2026 02:21:49 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.