Impact
Calibre’s composite_template handling can be exploited by embedding a nested template() call that bypasses the allow_python_templates restriction, enabling an attacker to execute arbitrary Python code when a malicious EPUB, OPF or PDF file is opened or imported. This flaw corresponds to code‑injection weaknesses (CWE‑94) and interpreter exploitation (CWE‑95), providing a direct path for remote code execution on the host system.
Affected Systems
The vulnerability affects the Kovid Goyal Calibre e‑book manager in all releases prior to 9.12.0; upgrading to version 9.12.0 or later removes the flaw. The issue is referenced in the official release notes and security advisory for that version.
Risk and Exploitability
The CVSS score for this vulnerability is 8.5, indicating high severity, while the EPSS score is less than 1 %, suggesting a low probability of exploitation in the wild. The vulnerability is not listed in the CISA KEV catalog. Attackers would need to supply a crafted e‑book file, so the primary vector is local or read‑access to the file, and successful exploitation would give the attacker full code execution rights on the machine running Calibre.
OpenCVE Enrichment