{"id":"CVE-2021-29136","aliases":["CVE-2021-29136","GHSA-9m95-8hx6-7p9v","GO-2022-0815"],"related":[],"kind":"vulnerability","state":"published","title":"Improper input validation in umoci","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\numoci 0.4.6 and earlier can be tricked into modifying host files by\ncreating a malicious layer that has a symlink with the name \".\" (or\n\"/\"). Because umoci deletes inodes if they change types, this results in\nthe rootfs directory being replaced with an attacker-controlled symlink.\nSubsequent image layers will then be applied on top of the target of the\nsymlink (which could be any directory on the host filesystem the user\nrunning umoci has access to).\n\nWhile umoci does have defences against symlink-based attacks, they are\nall implemented by resolving things relative to the rootfs directory --\nif the rootfs itself is a symlink, umoci resolves it first.\n\nThis vulnerability affects both \"umoci unpack\" and \"umoci raw unpack\".\n\n### Patches\nThis issue has been patched in umoci 0.4.7, see the references section\nfor the specific commit which fixed this vulnerability.\n\n### Workarounds\nNote that if you use umoci as an unprivileged user (using the --rootless\nflag) then umoci will not be able to overwrite any files that your user\ndoesn't have access to. Other possible mitigations are to run umoci\nunder an LSM profile such as AppArmor or SELinux to restrict the level\nof access it has outside of container image directories.\n\n### References\n* [oss-security public disclosure](https://www.openwall.com/lists/oss-security/2021/04/06/2)\n* [patch](https://github.com/opencontainers/umoci/commit/d9efc31daf2206f7d3fdb839863cf7a576a2eb57)\n\n### Credits\nThanks to Robin Peraglie from Cure53 for discovering and reporting this\nvulnerability.\n\n### For more information\n\nIf you have any questions or comments about this advisory\n* Open an issue in <https://github.com/opencontainers/umoci>.\n* Email us at <security@opencontainers.org>.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Improper input validation in umoci in github.com/opencontainers/umoci","format":"markdown","source":"go"},{"lang":"es","text":"Open Container Initiative umoci versiones anteriores a 0.4.7, permite a atacantes sobrescribir rutas de host arbitrarias por medio de una imagen diseñada que causa un salto de enlace simbólico cuando es usado \"umoci unpack\" o \"umoci raw unpack\"","source":"nvd"}],"published":"2021-04-06T15:57:49.000Z","modified":"2026-07-08T06:28:59.258Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:N/I:P/A:N","score":2.1,"rating":"LOW"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.4.7"}],"ecosystem":"Go","package":"github.com/opencontainers/umoci","purl":"pkg:golang/github.com/opencontainers/umoci","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.4.7"}],"ecosystem":"Go","package":"github.com/opencontainers/umoci","purl":"pkg:golang/github.com/opencontainers/umoci","source":"go"},{"ranges":[{"status":"affected","fixed":"0.4.7"}],"vendor":"linuxfoundation","product":"umoci","cpe":"cpe:2.3:a:linuxfoundation:umoci:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"3.7.3"}],"vendor":"sylabs","product":"singularity","cpe":"cpe:2.3:a:sylabs:singularity:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"http://www.openwall.com/lists/oss-security/2021/04/06/2","tags":["mailing-list","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/opencontainers/umoci/security/advisories/GHSA-9m95-8hx6-7p9v","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/opencontainers/umoci/commit/d9efc31daf2206f7d3fdb839863cf7a576a2eb57","tags":["fix","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29136","tags":["advisory"],"sources":["ghsa","go"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29136","url":"https://www.cve.org/CVERecord?id=CVE-2021-29136","licence":"CVE Terms of Use","modified":"2024-08-03T22:02:50.955Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9m95-8hx6-7p9v","url":"https://github.com/advisories/GHSA-9m95-8hx6-7p9v","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:59.258Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0815","url":"https://pkg.go.dev/vuln/GO-2022-0815","licence":"CC-BY-4.0","modified":"2026-03-03T04:50:56.673Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29136","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29136","licence":"Public domain","modified":"2026-06-17T03:47:20.523Z"}],"updatedAt":"2026-11-25T22:58:00.650Z","epss":{"score":0.00344,"percentile":0.2991,"date":"2026-12-02T12:00:21.000Z"}}