CVE-2023-6395
criticalpriority · track · 40EPSS 0.016 · 75 %ileEURUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–critical · 6.7–9.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (10)
Products and version ranges known to be affected.
- fedoraproject extra packages for enterprise linux= 7.0nvdUScpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:*:*:*:*:*:*:*:*
- fedoraproject extra packages for enterprise linux= 8.0nvdUScpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:*:*:*:*:*:*:*:*
- fedoraproject extra packages for enterprise linux= 9.0nvdUScpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:*:*:*:*:*:*:*:*
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-7j98-74jh-cjxhPrivilege escalation for users that can access mock configuration2024-01-16ghsa · osvUS
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.
- PYSEC-2026-1949Privilege escalation for users that can access mock configuration2026-07-07vendor · osvUS
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.
also known as (7)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (25)
External citations — patches, advisories, analysis.
- http://www.openwall.com/lists/oss-security/2024/01/16/1cnnvd
- http://www.openwall.com/lists/oss-security/2024/01/16/3cnnvd
- https://access.redhat.com/security/cve/CVE-2023-6395cnnvd
- https://access.redhat.com/security/cve/cve-2023-6395cnnvd
- https://bugzilla.redhat.com/show_bug.cgi?id=2252206cnnvd
- https://cxsecurity.com/cveshow/CVE-2023-6395/cnnvd
- https://github.com/rpm-software-management/mock/releases/tag/mock-5.4-1Patchcnnvd
- https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan