Skip to main content

calibre CVE-2026-73248

| EUVDEUVD-2026-57014 HIGH
Code Injection (CWE-94)
2026-08-11 security-advisories@github.com
8.5
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious EPUB with python: payload in composite_template metadata
  2. Delivery
    Deliver file to victim via download, email, or sharing
  3. Exploit
    Victim opens or imports file in calibre < 9.12.0
  4. Execution
    Outer program: formatter spawns child formatter without allow_python_templates=False
  5. Persist
    Child formatter reaches compile_python_template
  6. Impact
    Arbitrary Python executes as calibre process user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the victim open or import a file in calibre containing attacker-controlled composite_template metadata using a program: prefix with a nested template(), eval(), re_group(), or list_re_group() call embedding a python: sub-template. The affected file must be in a format calibre accepts for metadata processing (EPUB, OPF, PDF, or similar). No authentication, no elevated system privileges, and no special network configuration are required on the victim machine. Exploitation is constrained by: (1) the need for user interaction - the victim must open the file in calibre; (2) file delivery - the attacker must get the malicious file onto the victim's system. Python template processing is a core built-in feature enabled by default; there is no configuration setting to disable it without modifying calibre itself.

Impact

The CVSS 4.0 score of 8.5 (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H) is well-calibrated: the local attack vector correctly reflects that the malicious file must reach the victim's filesystem, and passive user interaction (opening or importing a file) is required. Despite these prerequisites, real-world risk is meaningful - calibre users routinely download and open untrusted e-books from the internet, making file-delivery a realistic social-engineering path. Attack complexity is low once the payload is embedded in a syntactically valid EPUB or OPF. No CISA KEV listing is present and no standalone POC has been publicly released, but the public patch diff effectively documents the exploit technique, reducing the reproduction barrier significantly. EPSS data is absent from the provided intelligence set and cannot be stated. The combination of passive user interaction as the only barrier, full VC/VI/VA impact, and a broadly used consumer-facing application makes this a genuine high-priority patch for any environment where calibre ingests untrusted content.

Exploit ScenarioDerived

An attacker distributes a crafted EPUB file - for example, via a torrent site, phishing email, or compromised e-book repository - with composite_template metadata set to program: template('python:\ndef evaluate(book, ctx): import subprocess; subprocess.run([...])'). When the victim opens or imports this file in calibre prior to 9.12.0, the metadata formatter spawns a child formatter without the allow_python_templates=False restriction, executing the embedded Python payload with the full privileges of the calibre process and the user running it. The public commit diff makes this attack pattern clear and reproducible without requiring independent vulnerability research.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 11, 2026

Arbitrary Python code execution in calibre's template engine affects all versions prior to 9.12.0, triggered when a user opens or imports a crafted EPUB, OPF, PDF, or OPF file containing malicious composite_template metadata. The root cause is a sandbox policy inheritance failure: nested formatter invocations via template(), eval(), re_group(), and list_re_group() instantiated fresh formatter objects without propagating allow_python_templates=False from the parent, allowing an embedded python: sub-template to bypass the restriction and reach compile_python_template. No public exploit has been identified at time of analysis, though the full patch diff is publicly visible on GitHub and makes the attack straightforward to reproduce.

RemediationAI

Upgrade calibre to version 9.12.0 or later, the vendor-confirmed fix release available at https://github.com/kovidgoyal/calibre/releases/tag/v9.12.0. The underlying patch (commit dac9990458374a81a5372a768bba6527d965aac8) ensures allow_python_templates is propagated to all child formatter instances. If immediate upgrade is not possible, avoid opening EPUB, OPF, PDF, or similar files from untrusted or unverified sources in calibre until the patch is applied - this is the only practical compensating control, as python template processing is a built-in feature with no independently configurable disable switch. Scanning incoming e-book files with antivirus tools will not reliably detect this attack since the payload is embedded as plain metadata text.

Affected VersionsENISA

Calibre < 9.12.0

Affected Packages

euvd calibre fix: 9.12.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

calibre implements a custom template language for book metadata processing, supporting program: (GPM mode) and python: (direct Python execution via compile_python_template) prefixes. The allow_python_templates flag on SafeFormat and EvalFormatter instances is the primary sandbox control. The CWE-94 (Code Injection) root cause is that four formatter functions - template(), eval(), re_group(), and list_re_group() - each instantiated new child formatter objects using formatter.__class__() or EvalFormatter() without copying allow_python_templates from the parent formatter. The fix in commit dac9990 explicitly propagates this flag to every newly created child formatter. An attacker embeds program: template('python:\ndef evaluate(book, ctx): ...') in composite_template metadata within a supported file format; when calibre parses that metadata, the outer GPM formatter runs with Python templates blocked, but the child spawned by template() defaults to unrestricted, reaching arbitrary Python execution.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 8.5 HIGH
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
vuln.today AI 7.8 HIGH

File must be opened locally (AV:L, UI:R); no privileges needed on target (PR:N); arbitrary Python execution yields full CIA impact with no scope change.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 11, 2026 - 23:04 EUVD
CVE Published
Aug 11, 2026 - 22:19 cve.org
HIGH 8.5

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Calibre users who open or import crafted documents face arbitrary Python code execution through a sandbox bypass vulnerability affecting all versions prior to 9.12.0, exposing systems to unauthorized code execution and potential data manipulation. While no public exploit code exists at time of analysis, the publicly available patch diff enables straightforward attack reproduction, creating urgent risk for organizations whose users import external content. The CVSS 8.5 severity and common document-handling workflows require immediate containment.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict calibre file imports to pre-approved trusted document sources only; (2) Execute calibre in isolated or sandboxed environments with minimal system and network access; (3) Implement process-level and file system monitoring to detect unauthorized Python code execution via calibre processes; (4) Disable Python template processing features in calibre configuration if supported; (5) Enable comprehensive logging of all calibre import and processing operations for audit and anomaly detection; (6) Require mandatory user training emphasizing prohibition on opening documents from untrusted or unvalidated external sources within calibre.

Threat Intelligence Overview

EPSS Score
0.1%
Top 95% exploitable
Prevalence
Medium
widely used open-source e-book manager among personal and library users
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy