Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-9m95-8hx6-7p9v

Опубликовано: 15 фев. 2022
Источник: github
Github: Прошло ревью
CVSS3: 5.5

Описание

Improper input validation in umoci

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

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

Пакеты

Наименование

github.com/opencontainers/umoci

go
Затронутые версииВерсия исправления

< 0.4.7

0.4.7

EPSS

Процентиль: 35%
0.00146
Низкий

5.5 Medium

CVSS3

Дефекты

CWE-20

Связанные уязвимости

CVSS3: 5.5
ubuntu
почти 5 лет назад

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.

CVSS3: 5.5
nvd
почти 5 лет назад

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.

CVSS3: 5.5
debian
почти 5 лет назад

Open Container Initiative umoci before 0.4.7 allows attackers to overw ...

suse-cvrf
больше 4 лет назад

Security update for umoci

suse-cvrf
больше 4 лет назад

Security update for umoci

EPSS

Процентиль: 35%
0.00146
Низкий

5.5 Medium

CVSS3

Дефекты

CWE-20