Kovidgoyal calibre
calibre: Bypass of Python template restrictions via nested `template()` leading to RCE
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.5high · scored by CNA · CWE-94
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
kovidgoyal calibre
- < 9.12.0
Fixed in 9.12.0
Mitigation
Upgrade calibre to 9.12.0 or later.
References
- Vendor advisory github.com/kovidgoyal/calibre/security/advisor…
- Patch github.com/kovidgoyal/calibre/commit/dac999045…
- Release notes github.com/kovidgoyal/calibre/releases/tag/v9.…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.