{"cve":"CVE-2023-6395","nvd":{"published":"2024-01-16T15:15:08.657","modified":"2026-06-17T06:50:40.763","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-20","CWE-94"],"references":["http://www.openwall.com/lists/oss-security/2024/01/16/1","http://www.openwall.com/lists/oss-security/2024/01/16/3","https://access.redhat.com/security/cve/CVE-2023-6395","https://bugzilla.redhat.com/show_bug.cgi?id=2252206","https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933"],"products":["fedoraproject:extra_packages_for_enterprise_linux","fedoraproject:fedora","rpm-software-management:mock"],"source":"nvd","synced_at":"2026-10-19T21:43:38.875533635+00:00"},"epss":{"cve":"CVE-2023-6395","score":0.01552,"percentile":0.75113,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-7j98-74jh-cjxh","url":"https://osv.dev/vulnerability/GHSA-7j98-74jh-cjxh","summary":"Privilege escalation for users that can access mock configuration","modified":"2026-07-07T17:57:36.802852547Z","packages":[{"ecosystem":"PyPI","name":"templated-dictionary","purl":"pkg:pypi/templated-dictionary","ranges":["<1.4.1"],"fixed":["1.4.1"]}]},{"id":"PYSEC-2026-1949","url":"https://osv.dev/vulnerability/PYSEC-2026-1949","summary":"Privilege escalation for users that can access mock configuration","modified":"2026-07-07T17:48:12.907173033Z","packages":[{"ecosystem":"PyPI","name":"templated-dictionary","purl":"pkg:pypi/templated-dictionary","ranges":["<1.4.1"],"fixed":["1.4.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}