CVE-2023-6395
"Mock Jinja2 Template Exploitation Privilege Escalation"
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.
INFO
Published Date :
Jan. 16, 2024, 3:15 p.m.
Last Modified :
Nov. 21, 2024, 8:43 a.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
5.9
Exploitability Score :
3.9
Affected Products
The following products are affected by CVE-2023-6395
vulnerability.
Even if cvefeed.io
is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2023-6395
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2023-6395
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2023-6395
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2024/01/16/1 Added Reference http://www.openwall.com/lists/oss-security/2024/01/16/3 Added Reference https://access.redhat.com/security/cve/CVE-2023-6395 Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2252206 Added Reference https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933 Added Reference https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69 Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/62SP2BJC2AFLFJJAEHPGZ3ZINTBTI7AN/ Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/NBFYREAJH4T7GXXQZ4GJEREN4Q3AHS3K/ -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Oct. 25, 2024
Action Type Old Value New Value Added CWE CISA-ADP CWE-94 -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Feb. 09, 2024
Action Type Old Value New Value Added Reference Red Hat, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/62SP2BJC2AFLFJJAEHPGZ3ZINTBTI7AN/ [No types assigned] -
CVE Modified by [email protected]
Jan. 30, 2024
Action Type Old Value New Value Added Reference Red Hat, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/NBFYREAJH4T7GXXQZ4GJEREN4Q3AHS3K/ [No types assigned] -
Initial Analysis by [email protected]
Jan. 25, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Changed Reference Type http://www.openwall.com/lists/oss-security/2024/01/16/1 No Types Assigned http://www.openwall.com/lists/oss-security/2024/01/16/1 Mailing List, Patch, Third Party Advisory Changed Reference Type http://www.openwall.com/lists/oss-security/2024/01/16/3 No Types Assigned http://www.openwall.com/lists/oss-security/2024/01/16/3 Exploit, Mailing List, Third Party Advisory Changed Reference Type https://access.redhat.com/security/cve/CVE-2023-6395 No Types Assigned https://access.redhat.com/security/cve/CVE-2023-6395 Third Party Advisory Changed Reference Type https://bugzilla.redhat.com/show_bug.cgi?id=2252206 No Types Assigned https://bugzilla.redhat.com/show_bug.cgi?id=2252206 Issue Tracking, Third Party Advisory Changed Reference Type https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933 No Types Assigned https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933 Patch Changed Reference Type https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69 No Types Assigned https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69 Patch Added CWE NIST NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:a:rpm-software-management:mock:-:*:*:*:*:*:*:* Added CPE Configuration OR *cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:7.0:*:*:*:*:*:*:* *cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:* *cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:9.0:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* -
CVE Modified by [email protected]
Jan. 16, 2024
Action Type Old Value New Value Added Reference Red Hat, Inc. http://www.openwall.com/lists/oss-security/2024/01/16/3 [No types assigned] -
CVE Modified by [email protected]
Jan. 16, 2024
Action Type Old Value New Value Added Reference Red Hat, Inc. http://www.openwall.com/lists/oss-security/2024/01/16/1 [No types assigned] -
CVE Received by [email protected]
Jan. 16, 2024
Action Type Old Value New Value Added 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. Added Reference Red Hat, Inc. https://access.redhat.com/security/cve/CVE-2023-6395 [No types assigned] Added Reference Red Hat, Inc. https://bugzilla.redhat.com/show_bug.cgi?id=2252206 [No types assigned] Added Reference Red Hat, Inc. https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933 [No types assigned] Added Reference Red Hat, Inc. https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69 [No types assigned] Added CWE Red Hat, Inc. CWE-20 Added CVSS V3.1 Red Hat, Inc. AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2023-6395
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2023-6395
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.36 }} -0.02%
score
0.71731
percentile