Home / mock / mock / CVE-2023-6395
CVE-2023-6395: is it exploited, and which versions of mock are affected and fixed?
CVE-2023-6395 is an improper input validation vulnerability in mock. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 18:09 UTC). Affected: templated_dictionary before 1.4.1 (GitHub advisory GHSA-7j98-74jh-cjxh). Fixed in 1.4.1 (GitHub advisory GHSA-7j98-74jh-cjxh). Severity: Medium (6.7, CVSS 3.1, from redhat).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 18:09 UTC, CVE record November 28, 2026, 19:14 UTC and NVD November 19, 2026, 07:32 UTC.
What is CVE-2023-6395?
Mock: privilege escalation for users that can access mock configuration
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.
From the CVE record by redhat, last updated February 13, 2025, 17:26 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| mock | all versions (the record names no range) | ||
| Red Hat | Red Hat Enterprise Linux 6 mock | not stated | |
| Fedora | Extra Packages for Enterprise Linux mock | all versions (the record names no range) | |
| Fedora | Fedora mock | all versions (the record names no range) |
As the CVE record by redhat states it, last updated February 13, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | templated_dictionary | < 1.4.1 | 1.4.1 | GHSA-7j98-74jh-cjxh |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated October 25, 2024. Summary: Privilege escalation for users that can access mock configuration.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| rpm-software-management | mock | all versions | application |
| fedoraproject | extra packages for enterprise linux | 7.0 | application |
| fedoraproject | extra packages for enterprise linux | 8.0 | application |
| fedoraproject | extra packages for enterprise linux | 9.0 | application |
| fedoraproject | fedora | 38 | operating system |
| fedoraproject | fedora | 39 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 06:50 UTC.
How severe is CVE-2023-6395?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.7 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H | redhat |
| Critical 9.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2023-6395 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: yes; technical impact: total (CISA ADP, October 25, 2024)
- EPSS
- 1.55% probability of exploitation activity in the next 30 days, percentile 75.9 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
Is there a workaround? (from the CVE record)
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Where are the vendor advisories and references?
- https://access.redhat.com/security/cve/CVE-2023-6395 vdb-entry, x_refsource_REDHAT
- RHBZ#2252206 issue-tracking, x_refsource_REDHAT
- https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933
- https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69
- http://www.openwall.com/lists/oss-security/2024/01/16/1
- http://www.openwall.com/lists/oss-security/2024/01/16/3
- https://lists.fedoraproject.org/archives/list/[email protected]/message/NBFYREAJH4T7GXXQZ4GJEREN4Q3AHS3K/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/62SP2BJC2AFLFJJAEHPGZ3ZINTBTI7AN/
Who found and reported it?
- Red Hat would like to thank Sankin Nikita Alexeevich for reporting this issue. (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- November 30, 2023
- Published
- January 16, 2024, 14:33 UTC
- CVE record updated
- February 13, 2025, 17:26 UTC by redhat
- NVD
- Modified, last modified June 17, 2026, 06:50 UTC
- Last checked
- CVE list November 28, 2026, 19:14 UTC; NVD November 19, 2026, 07:32 UTC; KEV December 3, 2026, 18:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
Questions about CVE-2023-6395
Is CVE-2023-6395 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 18:09 UTC. FIRST's EPSS gives it a 1.55% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of mock are affected by CVE-2023-6395?
templated_dictionary before 1.4.1, per the GitHub advisory GHSA-7j98-74jh-cjxh. The tables above give every range the sources list.
Which version fixes CVE-2023-6395?
1.4.1, per the GitHub advisory GHSA-7j98-74jh-cjxh. Check the vendor's advisory before you rely on it.
How severe is CVE-2023-6395?
Medium (6.7, CVSS 3.1, from redhat). The severity table above shows each score with its source.
Where is the official record of CVE-2023-6395?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.