CVE-2023-6395Mock: privilege escalation for users that can access mock configuration
- 6.7MediumCVSS base score
- 1.6%Exploitation in 30 daysEPSS · top 24% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By redhat
- 47 days later
· 47 days later
Published
- 13 months later
· 13 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 1.6% · top 24% of all CVEs (18 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.7.
Affected products
mock
All versions: affected
Red Hat · Red Hat Enterprise Linux 6
All versions: unaffected
Fedora · Extra Packages for Enterprise Linux
All versions: affected
All versions: affected
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPItemplated_dictionaryGHSA-7j98-74jh-cjxh (opens in a new tab)
What to do
Workaround: 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.
References
References8
- https://access.redhat.com/security/cve/CVE-2023-6395 (opens in a new tab)vdb-entryx_refsource_REDHATx_transferred
- RHBZ#2252206 (opens in a new tab)issue-trackingx_refsource_REDHATx_transferred
- https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933 (opens in a new tab)x_transferred
- https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69 (opens in a new tab)x_transferred
- http://www.openwall.com/lists/oss-security/2024/01/16/1 (opens in a new tab)x_transferred
- http://www.openwall.com/lists/oss-security/2024/01/16/3 (opens in a new tab)x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/NBFYREAJH4T7GXXQZ4GJEREN4Q3AHS3K/ (opens in a new tab)x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/62SP2BJC2AFLFJJAEHPGZ3ZINTBTI7AN/ (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-0284 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-7j98-74jh-cjxh (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-6395)Record last updated .