CVE-2026-73248 calibre: Bypass of Python template restrictions via nested `template()` leading to RCE
An attacker can execute arbitrary Python code by tricking a user into opening a malicious e-book file with crafted metadata.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-73248?
CVE-2026-73248 is a high-severity code injection vulnerability in kovidgoyal calibre, published on 11 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Which versions are affected by CVE-2026-73248?
How do I fix CVE-2026-73248?
Upgrade to a fixed version.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-73248 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-73248 exists.
Sources
Also known as DEBIAN-CVE-2026-73248, GHSA-4f7g-rjfp-hmvx, UBUNTU-CVE-2026-73248.