CVE-2023-6395
CRITICAL 9.8CVSS 3.1Privilege 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.
- Published
- 16 Jan 2024
- Last modified
- 7 Jul 2026
- Assigned by
- secalert@redhat.com
- NVD status
- Modified
- Weakness
- CWE-20CWE-94
- Also known as
- GHSA-7j98-74jh-cjxhPYSEC-2026-1949
- Sources
- NVDJSONOSV GHSA-7j98-74jh-cjxhJSONOSV PYSEC-2026-1949JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | secalert@redhat.com (Secondary) | CVSS 3.1 | MEDIUM 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rpm-software-management | mockcpe:2.3:a:rpm-software-management:mock:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | fedoraproject | extra_packages_for_enterprise_linuxcpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | fedoraproject | extra_packages_for_enterprise_linuxcpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:* |
= 8.0 | |
| NVD | fedoraproject | extra_packages_for_enterprise_linuxcpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* |
= 38 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* |
= 39 | |
| OSV | PyPI | templated-dictionary | < 1.4.1 | 1.4.1 |
References
- http://www.openwall.com/lists/oss-security/2024/01/16/1 · Mailing List, Patch, Third Party Advisory, WEB
- http://www.openwall.com/lists/oss-security/2024/01/16/3 · Exploit, Mailing List, Third Party Advisory, WEB
- https://access.redhat.com/security/cve/CVE-2023-6395 · Third Party Advisory, WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2252206 · Issue Tracking, Third Party Advisory, WEB
- https://github.com/xsuchy/templated-dictionary/commit/0740bd0ca8d487301881541028977d120f8b8933 · Patch, WEB
- https://github.com/xsuchy/templated-dictionary/commit/bcd90f0dafa365575c4b101e6f5d98c4ef4e4b69 · Patch, WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/62SP2BJC2AFLFJJAEHPGZ3ZINTBTI7AN/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NBFYREAJH4T7GXXQZ4GJEREN4Q3AHS3K/ · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-6395 · ADVISORY
- https://github.com/xsuchy/templated-dictionary · PACKAGE
- https://pypi.org/project/templated-dictionary · PACKAGE
- https://github.com/advisories/GHSA-7j98-74jh-cjxh · ADVISORY
History
- 25 Nov 2026 20:37 UTC · NVD: first stored (published 16 Jan 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 16 Jan 2024)