Open Container Initiative umoci before 0.4.7 allows attackers to overwrite arbitrary host paths via a crafted image that causes symlink traversal when "umoci unpack" or "umoci raw unpack" is used.
Open Container Initiative umoci before 0.4.7 allows attackers to overwrite arbitrary host paths via a crafted image that causes symlink traversal when "umoci unpack" or "umoci raw unpack" is used.
Open Container Initiative umoci before 0.4.7 allows attackers to overwrite arbitrary host paths via a crafted image that causes symlink traversal when "umoci unpack" or "umoci raw unpack" is used.
### Impact
umoci 0.4.6 and earlier can be tricked into modifying host files by
creating a malicious layer that has a symlink with the name "." (or
"/"). Because umoci deletes inodes if they change types, this results in
the rootfs directory being replaced with an attacker-controlled symlink.
Subsequent image layers will then be applied on top of the target of the
symlink (which could be any directory on the host filesystem the user
running umoci has access to).
While umoci does have defences against symlink-based attacks, they are
all implemented by resolving things relative to the rootfs directory --
if the rootfs itself is a symlink, umoci resolves it first.
This vulnerability affects both "umoci unpack" and "umoci raw unpack".
### Patches
This issue has been patched in umoci 0.4.7, see the references section
for the specific commit which fixed this vulnerability.
### Workarounds
Note that if you use umoci as an unprivileged user (using the --rootless
flag) then umoci will not be able to overwrite any files that your user
doesn't have access to. Other possible mitigations are to run umoci
under an LSM profile such as AppArmor or SELinux to restrict the level
of access it has outside of container image directories.
### References
* [oss-security public disclosure](https://www.openwall.com/lists/oss-security/2021/04/06/2)
* [patch](https://github.com/opencontainers/umoci/commit/d9efc31daf2206f7d3fdb839863cf7a576a2eb57)
### Credits
Thanks to Robin Peraglie from Cure53 for discovering and reporting this
vulnerability.
### For more information
If you have any questions or comments about this advisory
* Open an issue in <https://github.com/opencontainers/umoci>.
* Email us at <[email protected]>.
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: Apr 6, 2021, 3:57:49 PM
dateUpdated: Aug 3, 2024, 10:02:50 PM
9 related source bulletins · separate from aliases
SUSE-SU-2021:1116-1: Security update for umoci
CVE-2021-29136
openSUSE-SU-2021:0548-1: Security update for umoci
CVE-2021-29136
openSUSE-SU-2024:11384-1: singularity-3.8.3-1.2 on GA media
openSUSE-SU-2024:11482-1: umoci-0.4.7-2.3 on GA media
CVE-2021-29136
SUSE-SU-2021:1863-2: Security update for umoci
CVE-2021-29136
openSUSE-SU-2021:0810-1: Security update for singularity
CVE-2021-29136
openSUSE-SU-2021:0846-1: Security update for umoci
CVE-2021-29136
SUSE-SU-2021:1863-1: Security update for umoci
CVE-2021-29136
openSUSE-SU-2021:1863-1: Security update for umoci
CVE-2021-29136
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.
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-20
Original publisher date fields
published: 2021-04-06T16:15:16.520
lastModified: 2026-06-17T03:47:20.523
2 source CPE criteria · context only
cpe:2.3:a:linuxfoundation:umoci:*:*:*:*:*:*:*:*
cpe:2.3:a:sylabs:singularity:*:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.