CVSS 3.1
9.8 criticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCritical (9.8). EPSS 1.6% estimated probability of exploitation activity in the next 30 days. Fixed in templated-dictionary 1.4.1.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Htemplated-dictionary (PyPI): fixed in 1.4.1Explain CVE-2023-6395 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-6395?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-6395?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-6395 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| fedoraproject:extra_packages_for_enterprise_linux | 7.0 |
| fedoraproject:extra_packages_for_enterprise_linux | 8.0 |
| fedoraproject:extra_packages_for_enterprise_linux | 9.0 |
| fedoraproject:fedora | 38 |
| fedoraproject:fedora | 39 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-7j98-74jh-cjxh | PyPI | templated-dictionary | <1.4.1 | 1.4.1 |
| PYSEC-2026-1949 | PyPI | templated-dictionary | <1.4.1 | 1.4.1 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Ubuntu | 16.04:LTS, 18.04:LTS | mock | no fix listed | UBUNTU-CVE-2023-6395 |
| Azure Linux | 2 | python-templated-dictionary | no fix listed | AZL-43540 |
From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.
Red Hat rates this Moderate.
The identified vulnerability in the Mock software represents a moderate threat from a technical standpoint. The risk lies in the potential for an attacker to exploit privilege escalation, gaining the ability to execute arbitrary code with root user privileges. This vulnerability arises due to the absence of proper sandboxing during the expansion and execution of Jinja2 templates in specific configuration parameters. While the Mock documentation advises treating certain users as privileged, the risk is amplified by certain build systems inadvertently allowing less privileged users to define configuration tags. These tags can be passed as parameters to Mock during execution, creating a pathway for remote privilege escalation and the execution of arbitrary code on the build server. The moderate classification is attributed to the specific conditions required for exploitation and the potential impact on system integrity.
The fix for this issue is located at the `TemplatedDictionary' library, which mock heavily relies on to expand configuration values. This library was part of `mock` before but it was stripped to a separated code base in mock 2.9-1, while the vulnerability itself was introduced while `TemplatedDictionary` was part of mock code base in mock 1.4.
Red Hat Enterprise Linux 7, 8 and 9 are not affected by this vulnerability as those versions doesn't ship the `mock` package.
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.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | mock | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-6395.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).