Description: CVE-2025-64486
Author: Abhijith PA <abhijith@debian.org>
Origin: https://github.com/kovidgoyal/calibre/commit/6f94bce214bf7d43c829804db3741afa5e83c0c5
Last-Update: 2026-02-26

--- calibre-5.12.0+dfsg.orig/src/calibre/ebooks/conversion/plugins/fb2_input.py
+++ calibre-5.12.0+dfsg/src/calibre/ebooks/conversion/plugins/fb2_input.py
@@ -159,7 +159,7 @@ class FB2Input(InputFormatPlugin):
         from calibre.ebooks.fb2 import base64_decode
         self.binary_map = {}
         for elem in doc.xpath('./*'):
-            if elem.text and 'binary' in elem.tag and 'id' in elem.attrib:
+            if elem.text and 'binary' in elem.tag and elem.get('id', ''):
                 ct = elem.get('content-type', '')
                 fname = elem.attrib['id']
                 ext = ct.rpartition('/')[-1].lower()
