CVE-2026-88789
Camel Quarkus: Forced Xalan TransformerFactory drops upstream external-DTD/stylesheet hardening
Description
Improper Restriction of XML External Entity Reference in the XSLT support extension (camel-quarkus-support-xalan) in Apache Camel Quarkus allows an attacker who supplies the XML document being transformed to read local files or issue requests to internal network locations via an external entity declaration in that document. This issue affects Apache Camel Quarkus: from 3.2.0 before 3.33.3, from 3.34.0 before 3.40.0. The extension supplies its own Xalan-backed TransformerFactory to the xslt component and registers it as the JAXP default. Xalan-J 2.7.x predates JAXP 1.5 and does not honour javax.xml.XMLConstants.ACCESS_EXTERNAL_DTD or ACCESS_EXTERNAL_STYLESHEET, so the external access restrictions Apache Camel applies to the TransformerFactory it creates were not in effect. On the xslt component path this affects message bodies that reach the transformer already as a javax.xml.transform.Source; bodies of other types are converted to a SAXSource by Apache Camel with external entities and external DTD loading disabled, and are not affected. Because the factory is also the JAXP default, other code in the application obtaining one through TransformerFactory.newInstance() loses the same restrictions without error. Applications are affected if they use any of camel-quarkus-xslt, camel-quarkus-xslt-saxon, camel-quarkus-tika or camel-quarkus-xmlsecurity, each of which brings the XSLT support extension onto the classpath. For all but camel-quarkus-xslt, the exposure is limited to the JAXP default factory, since those extensions do not perform XSLT transformations themselves. Users are recommended to upgrade to version 3.33.3 or 3.40.0, which fixes this issue.
Mitigation
Credit
This issue was discovered by internal analysis
Notes
The GitHub issue https://github.com/apache/camel-quarkus/issues/9115 refers to the commits that resolved the issue, and has more details.
The fix was merged on main in https://github.com/apache/camel-quarkus/commit/9a570b64977b0e24f85d67c2b2220aeac9fa5274 and https://github.com/apache/camel-quarkus/commit/9dd11779580cd88e4ab01b23717cd0167f26155c, and backported to the 3.33.x branch in https://github.com/apache/camel-quarkus/commit/ad9c52365dc85eac029e8bfe3899aee07e48a525 and https://github.com/apache/camel-quarkus/commit/3d8867697c105c0d648fdcfe07f8dd7159cb3d47.
XalanTransformerFactory now applies the restrictions itself rather than relying on attributes Xalan cannot honour. Documents being transformed are parsed with an XMLReader that resolves neither external general nor external parameter entities and does not load external DTDs, which is the configuration Apache Camel’s XmlConverter.createSAXParserFactory uses for the bodies camel-xslt converts to a SAXSource itself; a SAXSource carrying a caller-configured XMLReader is used as it is, and DOMSource and StAXSource are already parsed. Resources fetched at transform time by the document() function are denied unless the application’s own URIResolver resolves them, and the restriction is installed on every entry point that hands out something to transform with, including the SAX push entry points whose transformers Xalan does not copy the factory resolver onto. Applications that set their own resolver, which camel-xslt does on every exchange, keep overriding it as before.
The issue is classified as CWE-611 (Improper Restriction of XML External Entity Reference).