CVE-2026-73248

calibre: Bypass of Python template restrictions via nested `template()` leading to RCE

Published Aug 11, 2026 CVSS 4.0 · 8.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Kovidgoyal
Kovidgoyal calibre
Vendors & Products Kovidgoyal
Kovidgoyal calibre
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'}

Weaknesses
  • CWE-94

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

  • CWE-95

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 12, 2026, 1:52 PM
Reserved
Aug 11, 2026, 5:18 PM
Status
Deferred
Published
Aug 11, 2026, 10:19 PM
Modified
Oct 24, 2026, 3:10 PM