Skip to content

CVE-2023-6395 Mock: privilege escalation for users that can access mock configuration

CriticalCVSS 9.8 EPSS 1.6%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: total
Technology
UbuntuRed Hat

Description

The Mock software contains a vulnerability wherein an attacker could potentially exploit privilege escalation, enabling the execution of arbitrary code with root user privileges. This weakness stems from the absence of proper sandboxing during the expansion and execution of Jinja2 templates, which may be included in certain configuration parameters. While the Mock documentation advises treating users added to the mock group as privileged, certain build systems invoking mock on behalf of users might inadvertently permit less privileged users to define configuration tags. These tags could then be passed as parameters to mock during execution, potentially leading to the utilization of Jinja2 templates for remote privilege escalation and the execution of arbitrary code as the root user on the build server.

Upgrade path

9 packages: 1 fixed, 5 with no fix yet.

PackageAffectedFixed inStatus
Fedora All versions No fix listed No fix yet
fedora Extra Packages for Enterprise Linux All versions No fix listed No fix yet
rpm-software-management mock All versions No fix listed No fix yet
ubuntu/mock(Ubuntu 16.04) = 1.1.33-1; All versions No fix listed No fix yet
ubuntu/mock(Ubuntu 18.04) = 1.3.2-2; All versions No fix listed No fix yet
pypi templated-dictionary(PyPI) < 1.4.1; = 1.0; = 1.1; = 1.2 1.4.1 Fixed
fedoraproject extra packages for enterprise linux = 7.0; = 8.0; = 9.0 No fix listed Versions listed
fedoraproject fedora = 38; = 39 No fix listed Versions listed
redhat enterprise linux = 6 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
pypi templated-dictionary(PyPI) < 1.4.1 1.4.1
pypi templated-dictionary(PyPI) = 1.0 No fix listed
pypi templated-dictionary(PyPI) = 1.1 No fix listed
pypi templated-dictionary(PyPI) = 1.2 No fix listed
redhat enterprise linux = 6 No fix listed
fedora Extra Packages for Enterprise Linux All versions No fix listed
Fedora All versions No fix listed
rpm-software-management mock All versions No fix listed
fedoraproject extra packages for enterprise linux = 7.0 No fix listed
fedoraproject extra packages for enterprise linux = 8.0 No fix listed
fedoraproject extra packages for enterprise linux = 9.0 No fix listed
fedoraproject fedora = 38 No fix listed
fedoraproject fedora = 39 No fix listed
ubuntu/mock(Ubuntu:16.04) All versions No fix listed
ubuntu/mock(Ubuntu:16.04) = 1.1.33-1 No fix listed
ubuntu/mock(Ubuntu:18.04) All versions No fix listed
ubuntu/mock(Ubuntu:18.04) = 1.3.2-2 No fix listed

References