CVE-2023-6395 Mock: privilege escalation for users that can access mock configuration
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com issue-tracking patch
- github.com issue-tracking patch
- access.redhat.com issue-tracking third-party-advisory vdb-entry
- RHBZ#2252206 issue-tracking third-party-advisory
- github.com product
- lists.fedoraproject.org
- lists.fedoraproject.org
- www.openwall.com issue-tracking mailing-list patch third-party-advisory
- www.openwall.com exploit issue-tracking mailing-list third-party-advisory
- pypi.org product
- github.com vendor-advisory
- ubuntu.com issue-tracking
- www.openwall.com issue-tracking
- www.cve.org issue-tracking