CVE-2021-29136
lowpriority · track · 22EPSS 0.003 · 28 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 2.1–5.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-9m95-8hx6-7p9vImproper input validation in umoci2022-02-15ghsa · osvUS
### 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 <security@opencontainers.org>.
- GO-2022-0815Improper input validation in umoci in github.com/opencontainers/umoci2024-08-21vendor · osvUS
Improper input validation in umoci in github.com/opencontainers/umoci
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (14)
External citations — patches, advisories, analysis.
- http://www.openwall.com/lists/oss-security/2021/04/06/2cnnvd
- https://github.com/opencontainers/umoci/commit/d9efc31daf2206f7d3fdb839863cf7a576a2eb57cnnvd
- https://github.com/opencontainers/umoci/security/advisories/GHSA-9m95-8hx6-7p9vcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2021-29136cnnvd
- https://vigilance.fr/vulnerability/umoci-write-access-via-Unpack-Symlink-Traversal-35048cnnvd
- https://www.auscert.org.au/bulletins/ESB-2021.1203cnnvd
- https://www.auscert.org.au/bulletins/ESB-2021.1963cnnvd
- https://www.auscert.org.au/bulletins/ESB-2021.2549cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan