CVE-2024-45310
published 2024-09-03CVE-2024-45310: runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be…
PriorityP418low3.6CVSS 3.1
AVLACLPRNUIRSCCNILAN
EPSS
0.32%
23.4th percentile
runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be tricked into creating empty files or directories in arbitrary locations in the host filesystem by sharing a volume between two containers and exploiting a race with `os.MkdirAll`. While this could be used to create empty files, existing files would not be truncated. An attacker must have the ability to start containers using some kind of custom volume configuration. Containers using user namespaces are still affected, but the scope of places an attacker can create inodes can be significantly reduced. Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block this attack -- we suspect the industry standard SELinux policy may restrict this attack's scope but the exact scope of protection hasn't been analysed. This is exploitable using runc directly as well as through Docker and Kubernetes. The issue is fixed in runc v1.1.14 and v1.2.0-rc3.
Some workarounds are available. Using user namespaces restricts this attack fairly significantly such that the attacker can only create inodes in directories that the remapped root user/group has write access to. Unless the root user is remapped to an actual
user on the host (such as with rootless containers that don't use `/etc/sub[ug]id`), this in practice means that an attacker would only be able to create inodes in world-writable directories. A strict enough SELinux or AppArmor policy could in principle also restrict the scope if a specific label is applied to the runc runtime, though neither the extent to which the standard existing policies block this attack nor what exact policies are needed to sufficiently restrict this attack have been thoroughly tested.
Affected
32 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | runc | < runc 1.1.15+ds1-1 (forky) | runc 1.1.15+ds1-1 (forky) |
| github.com | opencontainers_runc | >= 0 < 1.1.14 | 1.1.14 |
| github.com | opencontainers_runc | >= 1.0.0-rc3 < 1.2.8 | 1.2.8 |
| github.com | opencontainers_runc | >= 1.2.0-rc.1 < 1.2.0-rc.3 | 1.2.0-rc.3 |
| github.com | opencontainers_runc | >= 1.3.0-rc.1 < 1.3.3 | 1.3.3 |
| github.com | opencontainers_runc | >= 1.4.0-rc.1 < 1.4.0-rc.3 | 1.4.0-rc.3 |
| linuxfoundation | runc | < 1.1.14 | 1.1.14 |
| linuxfoundation | runc | — | — |
| linuxfoundation | runc | >= 0 < 1.1.15+ds1-1 | 1.1.15+ds1-1 |
| linuxfoundation | runc | >= 0 < 1.1.15+ds1-1 | 1.1.15+ds1-1 |
| msrc | azl3_cri-tools_1.30.1-1 | — | — |
| msrc | azl3_kata-containers-cc_3.15.0.aks0-1 | — | — |
| msrc | azl3_kata-containers_3.15.0.aks0-1 | — | — |
| msrc | azl3_kubernetes_1.30.10-7 | — | — |
| msrc | azl3_kubevirt_1.2.0-17 | — | — |
| msrc | azl3_libcontainers-common_20240213-3 | — | — |
| msrc | azl3_moby-engine_25.0.3-13 | — | — |
| msrc | azl3_runc_1.1.12-2 | — | — |
| msrc | azl3_runc_1.2.2-1 | — | — |
| msrc | cbl2_cri-o_1.22.3-14 | — | — |
| msrc | cbl2_cri-tools_1.29.0-6 | — | — |
| msrc | cbl2_kata-containers-cc_3.2.0.azl2-6 | — | — |
| msrc | cbl2_kata-containers_3.2.0.azl2-6 | — | — |
| msrc | cbl2_kubernetes_1.28.4-18 | — | — |
| msrc | cbl2_kubernetes_1.28.4-19 | — | — |
CVSS provenance
nvdv3.13.6LOWCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
ghsa7.3HIGH
osv7.3HIGH
vendor_debian3.6LOW
vendor_msrc3.6LOW
vendor_redhat3.6LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Microsoft
runc can be confused to create empty files/directories on the host
vendor_msrc·2024-09-10·CVSS 3.6
CVE-2024-45310 [LOW] CWE-363 runc can be confused to create empty files/directories on the host
runc can be confused to create empty files/directories on the host
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
GitHub_M: GitHub_M
Customer Action Required: Yes
Remediation: CBL-Mariner Releases
Referen
Red Hat
runc: runc can be tricked into creating empty files/directories on host
vendor_redhat·2024-09-03·CVSS 3.6
CVE-2024-45310 [LOW] CWE-22 runc: runc can be tricked into creating empty files/directories on host
runc: runc can be tricked into creating empty files/directories on host
runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be tricked into creating empty files or directories in arbitrary locations in the host filesystem by sharing a volume between two containers and exploiting a race with `os.MkdirAll`. While this could be used to create empty files, existing files would not be truncated. An attacker must have the ability to start containers using some kind of custom volume configuration. Containers using user namespaces are still affected, but the scope of places an attacker can create inodes can be significantly reduced. Sufficiently strict LSM policies (SELinux/Apparmor) can also in
Debian
CVE-2024-45310: runc - runc is a CLI tool for spawning and running containers according to the OCI spec...
vendor_debian·2024·CVSS 3.6
CVE-2024-45310 [LOW] CVE-2024-45310: runc - runc is a CLI tool for spawning and running containers according to the OCI spec...
runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be tricked into creating empty files or directories in arbitrary locations in the host filesystem by sharing a volume between two containers and exploiting a race with `os.MkdirAll`. While this could be used to create empty files, existing files would not be truncated. An attacker must have the ability to start containers using some kind of custom volume configuration. Containers using user namespaces are still affected, but the scope of places an attacker can create inodes can be significantly reduced. Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block this attack -- we suspect the industry standard SELinux p
OSV
runc container escape with malicious config due to /dev/console mount and related races
osv·2025-11-05·CVSS 7.3
CVE-2025-52565 [HIGH] runc container escape with malicious config due to /dev/console mount and related races
runc container escape with malicious config due to /dev/console mount and related races
### Impact ###
This attack is very similar in concept and application to CVE-2025-31133, except that it attacks a similar vulnerability in a different target (namely, the bind-mount of `/dev/pts/$n` to `/dev/console` as configured for all containers that allocate a console).
In runc version 1.0.0-rc3 and later, due to insufficient checks when bind-mounting `/dev/pts/$n` to `/dev/console` inside the container, an attacker can trick runc into bind-mounting paths which would normally be made read-only or be masked onto a path that the attacker can write to. This happens after `pivot_root(2)`, so this cannot be used to write to host files directly -- however, as with CVE-2025-31133, this can load to denia
GHSA
runc container escape with malicious config due to /dev/console mount and related races
ghsa·2025-11-05·CVSS 7.3
CVE-2025-52565 [HIGH] CWE-363 runc container escape with malicious config due to /dev/console mount and related races
runc container escape with malicious config due to /dev/console mount and related races
### Impact ###
This attack is very similar in concept and application to CVE-2025-31133, except that it attacks a similar vulnerability in a different target (namely, the bind-mount of `/dev/pts/$n` to `/dev/console` as configured for all containers that allocate a console).
In runc version 1.0.0-rc3 and later, due to insufficient checks when bind-mounting `/dev/pts/$n` to `/dev/console` inside the container, an attacker can trick runc into bind-mounting paths which would normally be made read-only or be masked onto a path that the attacker can write to. This happens after `pivot_root(2)`, so this cannot be used to write to host files directly -- however, as with CVE-2025-31133, this can load to denia
OSV
Can be confused to create empty files/directories on the host in github.com/opencontainers/runc
osv·2024-09-06
CVE-2024-45310 Can be confused to create empty files/directories on the host in github.com/opencontainers/runc
Can be confused to create empty files/directories on the host in github.com/opencontainers/runc
Can be confused to create empty files/directories on the host in github.com/opencontainers/runc
OSV
CVE-2024-45310: runc is a CLI tool for spawning and running containers according to the OCI specification
osv·2024-09-03·CVSS 3.6
CVE-2024-45310 [LOW] CVE-2024-45310: runc is a CLI tool for spawning and running containers according to the OCI specification
runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be tricked into creating empty files or directories in arbitrary locations in the host filesystem by sharing a volume between two containers and exploiting a race with `os.MkdirAll`. While this could be used to create empty files, existing files would not be truncated. An attacker must have the ability to start containers using some kind of custom volume configuration. Containers using user namespaces are still affected, but the scope of places an attacker can create inodes can be significantly reduced. Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block this attack -- we suspect the industry standard SELinux p
OSV
runc can be confused to create empty files/directories on the host
osv·2024-09-03
CVE-2024-45310 [MEDIUM] runc can be confused to create empty files/directories on the host
runc can be confused to create empty files/directories on the host
### Impact
runc 1.1.13 and earlier as well as 1.2.0-rc2 and earlier can be tricked into
creating empty files or directories in arbitrary locations in the host
filesystem by sharing a volume between two containers and exploiting a race
with os.MkdirAll. While this can be used to create empty files, existing
files **will not** be truncated.
An attacker must have the ability to start containers using some kind of custom
volume configuration. Containers using user namespaces are still affected, but
the scope of places an attacker can create inodes can be significantly reduced.
Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block
this attack -- we suspect the industry standard SELinux policy may rest
GHSA
runc can be confused to create empty files/directories on the host
ghsa·2024-09-03
CVE-2024-45310 [MEDIUM] CWE-363 runc can be confused to create empty files/directories on the host
runc can be confused to create empty files/directories on the host
### Impact
runc 1.1.13 and earlier as well as 1.2.0-rc2 and earlier can be tricked into
creating empty files or directories in arbitrary locations in the host
filesystem by sharing a volume between two containers and exploiting a race
with os.MkdirAll. While this can be used to create empty files, existing
files **will not** be truncated.
An attacker must have the ability to start containers using some kind of custom
volume configuration. Containers using user namespaces are still affected, but
the scope of places an attacker can create inodes can be significantly reduced.
Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block
this attack -- we suspect the industry standard SELinux policy may rest
No detection rules found.
No public exploits indexed.
https://github.com/opencontainers/runc/commit/63c2908164f3a1daea455bf5bcd8d363d70328c7https://github.com/opencontainers/runc/commit/8781993968fd964ac723ff5f360b6f259e809a3ehttps://github.com/opencontainers/runc/commit/f0b652ea61ff6750a8fcc69865d45a7abf37accfhttps://github.com/opencontainers/runc/pull/4359https://github.com/opencontainers/runc/security/advisories/GHSA-jfvp-7x6p-h2pvhttp://www.openwall.com/lists/oss-security/2024/09/03/1https://security.netapp.com/advisory/ntap-20250221-0008/
2024-09-03
Published