Description
calibre is an e-book manager. Prior to 9.12.0, calibre processes attacker-controlled composite_template metadata from a malicious EPUB, OPF, PDF, or similar file through program: and a nested template() call whose formatter does not inherit allow_python_templates=False, allowing a nested python: template to reach compile_python_template and execute arbitrary Python code when the file is opened or imported. This issue is fixed in version 9.12.0.
Published: 2026-08-11
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

Generated by OpenCVE AI on August 12, 2026 at 19:17 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade calibre to version 9.12.0 or later from the official release page.
  • Avoid opening untrusted EPUB, OPF, or PDF files until the upgrade is applied; consider disabling automated import or processing of such files.
  • If upgrading immediately is impossible, use the operating system’s sandboxing or run calibre in a restricted environment until the patch is deployed.

Generated by OpenCVE AI on August 12, 2026 at 19:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 12 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
First Time appeared Kovidgoyal
Kovidgoyal calibre
Vendors & Products Kovidgoyal
Kovidgoyal calibre

Tue, 11 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description calibre is an e-book manager. Prior to 9.12.0, calibre processes attacker-controlled composite_template metadata from a malicious EPUB, OPF, PDF, or similar file through program: and a nested template() call whose formatter does not inherit allow_python_templates=False, allowing a nested python: template to reach compile_python_template and execute arbitrary Python code when the file is opened or imported. This issue is fixed in version 9.12.0.
Title calibre: Bypass of Python template restrictions via nested `template()` leading to RCE
Weaknesses CWE-94
CWE-95
References
Metrics cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Kovidgoyal Calibre
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-12T13:52:18.881Z

Reserved: 2026-08-11T17:18:01.597Z

Link: CVE-2026-73248

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-11T22:19:05.553

Modified: 2026-08-12T14:18:39.060

Link: CVE-2026-73248

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-12T19:30:08Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')