Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft e-book with python: template in calibre:user_metadata
-
DeliveryDeliver malicious EPUB/OPF/PDF to victim
-
ExploitVictim adds or edits book in calibre
-
ExecutionMetadata parsed and passed to exec()
-
ImpactArbitrary Python runs as victim 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 the victim to process an attacker-supplied EPUB, OPF, or PDF in calibre via the Add books or Edit books workflow, which triggers metadata reading; the file must embed a custom column definition containing a 'python:' template inside the calibre:user_metadata field. Limiting factors: the vulnerable path is local only (AV:L) - the attacker must first deliver a file and cannot trigger it purely remotely - and it depends on passive user interaction (UI:P), i.e. the user must add or edit the malicious book. No authentication or special privileges are needed (PR:N), default configurations are affected since metadata reading is standard behavior, and only calibre versions before 9.10.0 are exploitable. |
| Impact | The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H, base 8.5 High) is internally consistent with the description: exploitation is local (the malicious file must be processed on the victim's system) and requires passive user interaction (adding or editing the book), but needs no privileges and grants full confidentiality, integrity, and availability impact via arbitrary code execution. No EPSS score, KEV listing, or POC was provided, so real-world exploitation pressure appears low-to-moderate today - this is a high-severity, socially-delivered RCE rather than a remotely-automatable mass-exploitation threat. The main risk driver is that metadata parsing happens automatically during import/edit, so no explicit 'run template' action is needed by the victim, lowering the effective interaction barrier. Priority should be elevated for environments that routinely ingest e-books from untrusted sources. |
| Exploit ScenarioDerived | An attacker publishes an innocuous-looking e-book (EPUB/OPF/PDF) on a download site or emails it to a target, with a malicious python: template embedded in a custom column definition inside calibre:user_metadata. When the victim adds the file to their calibre library or opens it in Edit books, calibre reads the metadata and executes the embedded Python via exec(), running attacker code with the victim's privileges. No public POC has been identified, but the attack requires only that the victim import the file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 07, 2026
Arbitrary Python code execution in calibre (e-book manager) before 9.10.0 lets attackers run code on a victim's machine simply by having them import or edit a malicious EPUB, OPF, or PDF. The crafted file embeds a custom column definition containing a python: template inside the calibre:user_metadata field, which calibre passes unsanitized to exec() in its template formatter during routine metadata reading (Add books / Edit books). No public exploit has been identified at time of analysis, but the flaw triggers through normal user workflows, making weaponized e-book files a realistic delivery vector.
RemediationAI
Upgrade to calibre 9.10.0, the vendor-released patch, which stops untrusted python: templates from reaching exec() during metadata parsing (see advisory GHSA-2j4m-2q7x-2c47 and release v9.10.0 at https://github.com/kovidgoyal/calibre/releases/tag/v9.10.0). Until you can upgrade, do not add or edit e-books from untrusted or unverified sources, since metadata is evaluated automatically during Add books and Edit books; where feasible, process untrusted files inside an isolated/sandboxed environment or disposable VM to contain any code execution, accepting the workflow overhead. Organizations distributing e-books internally should validate or strip the calibre:user_metadata field from externally received files before importing them.
Affected VersionsENISA
Affected Packages
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 is a widely used cross-platform e-book library manager written in Python. It stores per-book custom column definitions as serialized metadata under the calibre:user_metadata key inside e-book files (EPUB/OPF) and PDFs. calibre's template formatter supports a 'python:' template mode intended for user-authored formatting logic, which is evaluated via Python's exec(). The vulnerability (CWE-94, Improper Control of Generation of Code / code injection) arises because metadata parsed from an untrusted, attacker-supplied file is treated as trusted template source and passed to exec() without sanitization or sandboxing. The only affected product per CPE is cpe:2.3:a:kovidgoyal:calibre:*:*:*:*:*:*:*:* across all versions prior to 9.10.0.
Know when Calibre 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
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
File must be processed locally (AV:L) and the victim must add/edit the book (UI:R); no privileges needed (PR:N) and exec() yields full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
calibre is an e-book manager. Prior to 9.10.0, a malicious EPUB, OPF, or PDF file can execute arbitrary Python code when its metadata is read by calibre, including through Add books or Edit books, by embedding a custom column definition with a python: template in calibre:user_metadata that is passed unsanitized to exec() in the template formatter. This issue is fixed in version 9.10.0.
Articles & Coverage 1
Executive ViewAI
Calibre, a popular open-source e-book manager, is vulnerable to arbitrary code execution through malicious e-book files that execute when imported or edited. Users face direct risk of system compromise through normal file operations, with no vendor patch currently available. Organizations using calibre for e-book management should immediately implement file source restrictions and plan for emergency patching once the vendor releases a fix.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict calibre use to e-books from verified, trusted sources; disable or lock custom column/metadata features in calibre settings where operationally feasible; consider running calibre in a restricted user account or sandboxed environment; implement file-type whitelisting to block direct EPUB/OPF/PDF imports from untrusted channels. Monitor vendor advisories for patch availability and prepare emergency update procedures.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
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.
Remote code execution in Calibre 9.2.1 and earlier allows authenticated users to write arbitrary files via a path traver
Calibre versions 9.2.1 and below allow authenticated users to write arbitrary files with any extension to any writable l
Remote code execution in Calibre prior to version 9.2.0 through a path traversal flaw in the CHM reader allows local att
Calibre 9.1.0 and earlier contains a path traversal vulnerability in EPUB conversion that allows malicious EPUB files to
calibre is an e-book manager. [CVSS 7.8 HIGH]
gui2/viewer/bookmarkmanager.py in Calibre 3.18 calls cPickle.load on imported bookmark data, which allows remote attacke
Path traversal in Calibre <= 7.14.0 allow unauthenticated attackers to achieve arbitrary file read. Rated high severity
link_to_local_path in ebooks/conversion/plugins/html_input.py in calibre before 6.19.0 can, by default, add resources ou
calibre before 5.32.0 contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service) i
Unsanitized user-input in Calibre <= 7.15.0 allow users with permissions to perform full-text searches to achieve SQL in
HTTP response header injection in Calibre Content Server prior to version 9.4.0 permits authenticated users to inject ar
Unsanitized user-input in Calibre <= 7.15.0 allow attackers to perform reflected cross-site scripting. Rated medium seve
Same weakness CWE-94 – Code Injection
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-42102
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB