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.
https://github.com/kovidgoyal/calibre/security/advisories/GHSA-4f7g-rjfp-hmvx
https://github.com/kovidgoyal/calibre/releases/tag/v9.12.0
https://github.com/kovidgoyal/calibre/commit/dac9990458374a81a5372a768bba6527d965aac8
Published: 2026-08-11
Updated: 2026-08-11
Base Score: 6.8
Vector: CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P
Severity: Medium
Base Score: 7.8
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Severity: High
Base 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
Severity: High