The security vulnerability is an XML External Entity (XXE) injection weakness in the docling library. The root cause is the use of insecure default XML parsers in multiple backends. The advisory specifically calls out the USPTO patent backend, which uses xml.sax.parseString across three different classes (PatentUsptoIce, PatentUsptoGrantV25, PatentUsptoApplicationV1x) in their respective parse methods. This function processes external XML entities, which allows an attacker to read arbitrary files from the server, initiate server-side requests (SSRF), or trigger denial-of-service attacks.
The analysis of the patch commit 576bada7b7d542ea308778a053bc3c4d49086f20 confirms this. The commit replaces the vulnerable xml.sax.parseString calls with defusedxml.sax.make_parser, a library designed to prevent such attacks. The parser is explicitly configured to disable external entity resolution while still allowing the DTDs required by the USPTO format.
Furthermore, the same commit also patched a similar XXE vulnerability in the JATS backend (JatsDocumentBackend.__init__), where lxml.etree.parse was used without a secure parser. The fix was to instantiate etree.XMLParser with resolve_entities=False. Although not mentioned in the advisory's title, this function is also considered vulnerable and was patched simultaneously, indicating it is part of the same security effort.