{"id":"CVE-2026-73248","aliases":["DEBIAN-CVE-2026-73248","EUVD-2026-57014","GHSA-4f7g-rjfp-hmvx","UBUNTU-CVE-2026-73248"],"status":"published","title":"calibre: Bypass of Python template restrictions via nested `template()` leading to RCE","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.","severity":{"version":"4.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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00197,"percentile":0.09488,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94","CWE-95"],"published":"2026-08-11T21:56:08Z","modified":"2026-10-28T02:30:29Z","fixes":[{"ecosystem":"Debian:14","package":"calibre","fixed_in":["9.12.0+ds+~0.10.6-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.13.0+repack-2","6.13.0+repack-2+deb12u1","6.13.0+repack-2+deb12u10","6.13.0+repack-2+deb12u2","6.13.0+repack-2+deb12u3","6.13.0+repack-2+deb12u4","6.13.0+repack-2+deb12u5","6.13.0+repack-2+deb12u6","6.13.0+repack-2+deb12u7","6.13.0+repack-2+deb12u8","6.13.0+repack-2+deb12u9","6.14.0-1","6.14.1-1","6.15.0-1","6.15.1-1","6.15.1-2","6.15.1-3","6.15.1-4","6.16.0-1","6.17.0-1","6.18.1-1","6.18.1-2","6.18.1-3","6.19.1-1","6.20.0-1","6.21.0-1","6.21.0-2","6.22.0-1","6.23.0-1","6.23.0-2","6.24.0+ds-1","6.24.0-1","6.24.0-2","6.25.0+ds-1","6.26.0+ds-1","6.27.0+ds-1","6.28.0+ds-1","6.28.1+ds-1","6.29.0+ds-1","7.0.0+ds-1","7.1.0+ds-1","7.1.0+ds-2","7.10.0+ds-1","7.11.0+ds-1","7.12.0+ds-1","7.12.0+ds-2","7.12.0+ds-3","7.13.0+ds-1","7.13.0+ds-2","7.14.0+ds-1","7.15.0+ds-1","7.16.0+ds-1","7.16.0+ds-2","7.16.0+ds-3","7.17.0+ds-1","7.17.0+ds-2","7.17.0+ds-3","7.17.0+ds-4","7.18.0+ds-1","7.19.0+ds-1","7.19.0+ds-2","7.2.0+ds-1","7.20.0+ds-1","7.21.0+ds-1","7.21.0+ds-2","7.22.0+ds-1","7.22.0+ds-2","7.23.0+ds-1","7.23.0+ds-2","7.24.0+ds-1","7.24.0+ds-2","7.25.0+ds-1","7.26.0+ds-1","7.26.0+ds-2","7.26.0+ds-3","7.26.0+ds-4","7.3.0+ds-1","7.4.0+ds-1","7.5.1+ds-1","7.5.1+ds-2","7.5.1+ds-3","7.6.0+ds-1","7.7.0+ds-1","7.7.0+ds-2","7.8.0+ds1-1","7.8.0+ds1-2","7.8.0+ds2-1","7.9.0+ds-1","7.9.0+ds-2","8.0.0+ds-1","8.0.1+ds-1","8.1.0+ds-1","8.1.1+ds-1","8.10.0+ds-1","8.10.0+ds-2","8.10.0+ds-3","8.11.0+ds+~0.10.5-1","8.11.1+ds+~0.10.5-1","8.11.1+ds+~0.10.5-2","8.11.1+ds+~0.10.5-3","8.12.0+ds+~0.10.5-1","8.13.0+ds+~0.10.5-1","8.13.0+ds+~0.10.5-2","8.13.0+ds+~0.10.5-3","8.14.0+ds+~0.10.5-1","8.14.0+ds+~0.10.5-1~bpo13+1","8.15.0+ds+~0.10.5-1","8.15.0+ds+~0.10.5-1~bpo13+1","8.15.0+ds+~0.10.5-2","8.16.0+ds+~0.10.5-1","8.16.0+ds+~0.10.5-2","8.16.1+ds+~0.10.5-1","8.16.2+ds+~0.10.5-1","8.16.2+ds+~0.10.5-2","8.16.2+ds+~0.10.5-3","8.16.2+ds+~0.10.5-3~bpo13+1","8.2.1+ds-1","8.2.100+ds-1","8.3.0+ds-1","8.4.0+ds-1","8.4.0+ds1-1~exp1","8.5.0+ds-1","8.6.0+ds-1","8.7.0+ds-1","8.8.0+ds-1","8.8.0+ds-2","8.8.0+ds-2+gcc15","8.8.0+ds-3","8.9.0+ds-1","8.9.0+ds-2","8.9.0+ds-3","8.9.0+ds-4","9.0.0+ds+~0.10.5-1","9.1.0+ds+~0.10.5-1","9.10.0+ds+~0.10.6-1","9.10.0+ds+~0.10.6-2","9.11.0+ds+~0.10.6-1","9.11.0+ds+~0.10.6-2","9.12.0+ds+~0.10.6-1","9.13.0+ds+~0.10.6-1","9.14.0+ds+~0.10.6-1","9.14.0+ds+~0.10.6-2","9.15.0+ds+~1.1.2-1","9.15.0+ds+~1.1.2-2","9.15.0+ds+~1.1.2-3","9.16.0+ds+~1.1.2-1","9.17.0+ds+~1.1.2-1","9.2.0+ds+~0.10.5-1","9.2.1+ds+~0.10.5-1","9.2.1+ds+~0.10.5-2","9.3.0+ds+~0.10.5-1","9.3.1+ds+~0.10.5-1","9.4.0+ds+~0.10.5-1","9.5.0+ds+~0.10.5-1","9.6.0+ds+~0.10.5-1","9.6.0+ds+~0.10.5-2","9.6.0+ds+~0.10.5-3","9.6.0+ds+~0.10.5-4","9.6.0+ds+~0.10.5-5","9.6.0+ds+~0.10.5-6","9.7.0+ds+~0.10.5-1","9.7.0+ds+~0.10.5-2","9.8.0+ds+~0.10.5-1","9.8.0+ds+~0.10.5-2","9.8.0+ds+~0.10.5-3","9.8.0+ds+~0.10.5-4","9.8.0+ds+~0.10.5-5","9.8.0+ds+~0.10.6-1","9.8.0+ds+~0.10.6-2","9.9.0+ds+~0.10.6-1"]},{"source":"osv","ecosystem":"Debian:13","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.10.0+ds-1","8.10.0+ds-2","8.10.0+ds-3","8.11.0+ds+~0.10.5-1","8.11.1+ds+~0.10.5-1","8.11.1+ds+~0.10.5-2","8.11.1+ds+~0.10.5-3","8.12.0+ds+~0.10.5-1","8.13.0+ds+~0.10.5-1","8.13.0+ds+~0.10.5-2","8.13.0+ds+~0.10.5-3","8.14.0+ds+~0.10.5-1","8.14.0+ds+~0.10.5-1~bpo13+1","8.15.0+ds+~0.10.5-1","8.15.0+ds+~0.10.5-1~bpo13+1","8.15.0+ds+~0.10.5-2","8.16.0+ds+~0.10.5-1","8.16.0+ds+~0.10.5-2","8.16.1+ds+~0.10.5-1","8.16.2+ds+~0.10.5-1","8.16.2+ds+~0.10.5-2","8.16.2+ds+~0.10.5-3","8.16.2+ds+~0.10.5-3~bpo13+1","8.5.0+ds-1","8.5.0+ds-1+deb13u1","8.5.0+ds-1+deb13u2","8.5.0+ds-1+deb13u3","8.6.0+ds-1","8.7.0+ds-1","8.8.0+ds-1","8.8.0+ds-2","8.8.0+ds-2+gcc15","8.8.0+ds-3","8.9.0+ds-1","8.9.0+ds-2","8.9.0+ds-3","8.9.0+ds-4","9.0.0+ds+~0.10.5-1","9.1.0+ds+~0.10.5-1","9.10.0+ds+~0.10.6-1","9.10.0+ds+~0.10.6-2","9.11.0+ds+~0.10.6-1","9.11.0+ds+~0.10.6-2","9.12.0+ds+~0.10.6-1","9.13.0+ds+~0.10.6-1","9.14.0+ds+~0.10.6-1","9.14.0+ds+~0.10.6-2","9.15.0+ds+~1.1.2-1","9.15.0+ds+~1.1.2-2","9.15.0+ds+~1.1.2-3","9.16.0+ds+~1.1.2-1","9.17.0+ds+~1.1.2-1","9.2.0+ds+~0.10.5-1","9.2.1+ds+~0.10.5-1","9.2.1+ds+~0.10.5-2","9.3.0+ds+~0.10.5-1","9.3.1+ds+~0.10.5-1","9.4.0+ds+~0.10.5-1","9.5.0+ds+~0.10.5-1","9.6.0+ds+~0.10.5-1","9.6.0+ds+~0.10.5-2","9.6.0+ds+~0.10.5-3","9.6.0+ds+~0.10.5-4","9.6.0+ds+~0.10.5-5","9.6.0+ds+~0.10.5-6","9.7.0+ds+~0.10.5-1","9.7.0+ds+~0.10.5-2","9.8.0+ds+~0.10.5-1","9.8.0+ds+~0.10.5-2","9.8.0+ds+~0.10.5-3","9.8.0+ds+~0.10.5-4","9.8.0+ds+~0.10.5-5","9.8.0+ds+~0.10.6-1","9.8.0+ds+~0.10.6-2","9.9.0+ds+~0.10.6-1"]},{"source":"osv","ecosystem":"Debian:14","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.12.0+ds+~0.10.6-1"}]}],"versions":["8.10.0+ds-1","8.10.0+ds-2","8.10.0+ds-3","8.11.0+ds+~0.10.5-1","8.11.1+ds+~0.10.5-1","8.11.1+ds+~0.10.5-2","8.11.1+ds+~0.10.5-3","8.12.0+ds+~0.10.5-1","8.13.0+ds+~0.10.5-1","8.13.0+ds+~0.10.5-2","8.13.0+ds+~0.10.5-3","8.14.0+ds+~0.10.5-1","8.14.0+ds+~0.10.5-1~bpo13+1","8.15.0+ds+~0.10.5-1","8.15.0+ds+~0.10.5-1~bpo13+1","8.15.0+ds+~0.10.5-2","8.16.0+ds+~0.10.5-1","8.16.0+ds+~0.10.5-2","8.16.1+ds+~0.10.5-1","8.16.2+ds+~0.10.5-1","8.16.2+ds+~0.10.5-2","8.16.2+ds+~0.10.5-3","8.16.2+ds+~0.10.5-3~bpo13+1","8.5.0+ds-1","8.6.0+ds-1","8.7.0+ds-1","8.8.0+ds-1","8.8.0+ds-2","8.8.0+ds-2+gcc15","8.8.0+ds-3","8.9.0+ds-1","8.9.0+ds-2","8.9.0+ds-3","8.9.0+ds-4","9.0.0+ds+~0.10.5-1","9.1.0+ds+~0.10.5-1","9.10.0+ds+~0.10.6-1","9.10.0+ds+~0.10.6-2","9.11.0+ds+~0.10.6-1","9.11.0+ds+~0.10.6-2","9.2.0+ds+~0.10.5-1","9.2.1+ds+~0.10.5-1","9.2.1+ds+~0.10.5-2","9.3.0+ds+~0.10.5-1","9.3.1+ds+~0.10.5-1","9.4.0+ds+~0.10.5-1","9.5.0+ds+~0.10.5-1","9.6.0+ds+~0.10.5-1","9.6.0+ds+~0.10.5-2","9.6.0+ds+~0.10.5-3","9.6.0+ds+~0.10.5-4","9.6.0+ds+~0.10.5-5","9.6.0+ds+~0.10.5-6","9.7.0+ds+~0.10.5-1","9.7.0+ds+~0.10.5-2","9.8.0+ds+~0.10.5-1","9.8.0+ds+~0.10.5-2","9.8.0+ds+~0.10.5-3","9.8.0+ds+~0.10.5-4","9.8.0+ds+~0.10.5-5","9.8.0+ds+~0.10.6-1","9.8.0+ds+~0.10.6-2","9.9.0+ds+~0.10.6-1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.33.0+dfsg-1build1","2.38.0+dfsg-1","2.45.0+dfsg-1","2.45.0+dfsg-1build1","2.48.0+dfsg-1","2.48.0+dfsg-1build1","2.54.0+dfsg-1","2.55.0+dfsg-1","2.55.0+dfsg-1ubuntu0.2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.7.0+dfsg-2","3.7.0+dfsg-2build1","3.12.0+dfsg-1","3.13.0+dfsg-1","3.14.0+dfsg-1","3.15.0.1+dfsg-1","3.16.0+dfsg-1","3.16.0+dfsg-1build1","3.17.0+dfsg-1","3.17.0+dfsg-2","3.18.0+dfsg-1build1","3.19.0+dfsg-1","3.20.0+dfsg-1","3.21.0+dfsg-1","3.21.0+dfsg-1build1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.46.0+dfsg-1","4.2.0+dfsg-2","4.3.0+dfsg-1","4.3.0+dfsg-2","4.4.0+dfsg-1","4.5.0+dfsg-1","4.5.0+dfsg-2","4.5.0+dfsg-3","4.6.0+dfsg-1","4.7.0+dfsg-1","4.99.3+dfsg-2","4.99.4+dfsg-1","4.99.4+dfsg-1build1","4.99.4+dfsg+really4.10.0+py3-2","4.99.4+dfsg+really4.11.2-1","4.99.4+dfsg+really4.11.2-1build1","4.99.4+dfsg+really4.12.0-1","4.99.4+dfsg+really4.12.0-1build1","4.99.4+dfsg+really4.12.0-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.25.0+dfsg-2","5.33.2+dfsg-1","5.34.0+dfsg-1","5.35.0+dfsg-1ubuntu2","5.37.0+dfsg-1","5.37.0+dfsg-1build1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.24.0+ds-1","6.29.0+ds-1","7.0.0+ds-1","7.1.0+ds-1","7.1.0+ds-2","7.2.0+ds-1","7.2.0+ds-1build1","7.3.0+ds-1","7.4.0+ds-1","7.5.1+ds-1","7.5.1+ds-2","7.5.1+ds-3","7.6.0+ds-1","7.6.0+ds-1build1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.2.1+ds+~0.10.5-2build1","9.9.0+ds+~0.10.6-1","9.11.0+ds+~0.10.6-1","9.11.0+ds+~0.10.6-2","9.13.0+ds+~0.10.6-1","9.14.0+ds+~0.10.6-2build1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"calibre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.8.0+ds-3build1","8.13.0+ds+~0.10.5-3","8.14.0+ds+~0.10.5-1","8.15.0+ds+~0.10.5-1","8.16.0+ds+~0.10.5-2","8.16.2+ds+~0.10.5-1","8.16.2+ds+~0.10.5-2","8.16.2+ds+~0.10.5-3","9.2.1+ds+~0.10.5-2build1"]}],"products":[{"vendor":"kovidgoyal","product":"calibre"}],"references":[{"url":"https://github.com/kovidgoyal/calibre/security/advisories/GHSA-4f7g-rjfp-hmvx","tags":["x_refsource_CONFIRM","exploit","advisory","report"]},{"url":"https://github.com/kovidgoyal/calibre/commit/dac9990458374a81a5372a768bba6527d965aac8","tags":["x_refsource_MISC","fix","report"]},{"url":"https://github.com/kovidgoyal/calibre/releases/tag/v9.12.0","tags":["x_refsource_MISC","web","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73248.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73248","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-73248","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-73248","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-73248","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-73248","title":"calibre: Bypass of Python template restrictions via nested `template()` leading to RCE","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.","status":"published","published":"2026-08-11T21:56:08.569Z","modified":"2026-08-12T13:52:18.881Z","cvss":[{"version":"4.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","level":"high","assessor":"cna"}],"cwes":["CWE-94","CWE-95"],"updated_at":"2026-11-02T13:43:33.766176Z"}],"euvd":[{"id":"EUVD-2026-57014","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.","status":"published","published":"2026-08-11T21:56:08Z","modified":"2026-08-12T13:52:18Z","cvss":[{"version":"4.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","level":"high"}],"updated_at":"2026-11-02T18:01:58.638592Z"}],"nvd":[{"id":"CVE-2026-73248","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.","status":"published","published":"2026-08-11T22:19:05.553Z","modified":"2026-10-24T15:10:00.19Z","cvss":[{"version":"4.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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"}],"cwes":["CWE-94","CWE-95"],"updated_at":"2026-11-02T14:12:36.880938Z"}],"osv":[{"id":"CVE-2026-73248","title":"calibre: Bypass of Python template restrictions via nested `template()` leading to RCE","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.","status":"published","published":"2026-08-11T21:56:08.569Z","modified":"2026-10-28T02:30:29.921942035Z","cvss":[{"version":"4.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","level":"high"}],"cwes":["CWE-94","CWE-95"],"updated_at":"2026-11-02T15:45:16.365946Z"},{"id":"DEBIAN-CVE-2026-73248","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.","status":"published","published":"2026-08-11T22:19:05.553Z","modified":"2026-10-25T09:47:33.233405031Z","cvss":[{"version":"4.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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:46:02.499355Z"},{"id":"UBUNTU-CVE-2026-73248","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.","status":"published","published":"2026-08-11T22:19:00Z","modified":"2026-10-17T12:55:30.715205371Z","cvss":[{"version":"4.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","level":"high"}],"updated_at":"2026-11-02T16:57:08.628462Z"}]}}
