Junglewise Threat Intelligence

CVE-2026-53511: Calibre arbitrary code execution via malicious book metadata

CVE-2026-53511 · Severity: info · CVSS 8.5 · Published 2026-07-07

Vendors: Kovidgoyal.

Executive brief

Calibre, a popular e-book management application, is vulnerable to a security flaw that allows malicious e-book files to execute unauthorized code on a user's computer. By simply adding or editing a specially crafted EPUB, PDF, or OPF file, an attacker can gain the same permissions as the user, potentially leading to data theft or full system compromise. Users should update to version 9.10.0 or later to resolve this issue.

Technical details

A code injection vulnerability exists in Calibre's template formatter prior to version 9.10.0. The root cause is the unsanitized processing of 'calibre:user_metadata' within EPUB, OPF, or PDF files. When Calibre reads metadata (e.g., during 'Add books' or 'Edit books' operations), it parses custom column definitions via json.loads() and stores them. If a composite custom column contains a 'python:' template, it is passed to the template formatter's safe_format() method, which eventually reaches exec() via compile_python_template(). An attacker can exploit this by providing a malicious e-book file that, when imported or edited, executes arbitrary Python code with the privileges of the Calibre process. The fix involves disallowing Python templates when reading book metadata.

Affected products

  • kovidgoyal calibre < 9.10.0

Timeline

  • 2026-06-26: patched: Version 9.10.0 released
  • 2026-06-26: advisory: GitHub Security Advisory published
  • 2026-07-07: disclosed: CVE-2026-53511 published to NVD

References