CVE-2023-6395

MEDIUM
Published Jan 16, 2024 Modified Nov 21, 2024 CWE-20 CWE-94

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.

Is your site exposed to CVE-2023-6395?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

6.7
MEDIUM
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Weakness Type (CWE)

CWE-20 Improper Input Validation
CWE-94 CWE-94

Affected Products

Vendor Product
rpm-software-management mock
fedoraproject extra_packages_for_enterprise_linux
fedoraproject extra_packages_for_enterprise_linux
fedoraproject extra_packages_for_enterprise_linux
fedoraproject fedora
fedoraproject fedora

References

Frequently Asked Questions

What is CVE-2023-6395? +
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. It has a CVSS v3.1 base score of 6.7 (MEDIUM).
How severe is CVE-2023-6395? +
CVE-2023-6395 has a CVSS v3.1 score of 6.7 out of 10, rated MEDIUM. This is a medium-severity vulnerability that should be remediated as part of regular maintenance.
What products are affected by CVE-2023-6395? +
CVE-2023-6395 affects products from fedoraproject, rpm-software-management, specifically: extra_packages_for_enterprise_linux, fedora, mock. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2023-6395? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2023-6395 — free, no signup required.