Description
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.
Published: 2026-07-07
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An attacker can embed a malicious python: template inside a custom column definition within the calibre:user_metadata field of an EPUB, OPF, or PDF file. When calibre reads the metadata, the template is passed unsanitized to the template formatter, allowing arbitrary Python code execution. This is a CWE‑94 code injection vulnerability that can compromise confidentiality, integrity, and availability of the system where calibre is running.

Affected Systems

The issue exists in the KovidGoyal calibre e‑book manager prior to the release of version 9.10.0. Any installation running calibre 9.9 or earlier, or any other legacy releases that have not applied the fix, is vulnerable. Users that interact with untrusted EPUB, OPF, or PDF files in these versions are at risk.

Risk and Exploitability

The CVSS score is 8.5, indicating high severity. The EPSS score of less than 1% denotes a very low, yet non‑zero, probability of exploitation. The vulnerability is not listed in CISA KEV. The likely attack vector is the local processing of a malicious book file that an attacker supplies to a user; once the user opens or edits the file, arbitrary code runs on the system where calibre is installed.

Generated by OpenCVE AI on July 26, 2026 at 19:00 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade calibre to version 9.10.0 or later, which removes the unsafe template formatter.
  • Remove or edit any custom column definitions that contain python: templates in the calibre:user_metadata field so that accidental execution is prevented.
  • Avoid importing, adding, or editing EPUB, OPF, or PDF files from untrusted sources until the upgrade is completed.

Generated by OpenCVE AI on July 26, 2026 at 19:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 08 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 07 Jul 2026 23:00:00 +0000

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

Tue, 07 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
Description 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.
Title calibre: Arbitrary Code Execution in Template Formatter via Book Metadata
Weaknesses CWE-94
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-07-09T03:55:49.907Z

Reserved: 2026-06-09T17:30:33.455Z

Link: CVE-2026-53511

cve-icon Vulnrichment

Updated: 2026-07-08T12:57:53.875Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T19:15:03Z

Weaknesses
  • CWE-94

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