ADVISORIES

Vulnerability

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.

7 advisories report this vulnerability, across 4 ecosystems.

Advisories

  • AZL-43540

    CVE-2023-6395 affecting package python-templated-dictionary 1.1-6

    CVE-2023-6395 Azure Linux Updated 21 April 2026
  • GHSA-7j98-74jh-cjxh

    Privilege escalation for users that can access mock configuration

    Moderate CVE-2023-6395 PyPI Updated 7 July 2026
  • OESA-2026-3913

    python-templated-dictionary security update

    Critical CVE-2023-6395 openEuler Updated 20 September 2026
  • OESA-2026-3914

    python-templated-dictionary security update

    Critical CVE-2023-6395 openEuler Updated 20 September 2026
  • OESA-2026-4061

    python-templated-dictionary security update

    Critical CVE-2023-6395 openEuler Updated 25 September 2026
  • PYSEC-2026-1949

    Privilege escalation for users that can access mock configuration

    CVE-2023-6395 PyPI Updated 7 July 2026
  • UBUNTU-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…

    CVE-2023-6395 Ubuntu Updated 24 October 2025

References