Saxon XQuery processing exposes XML external entities
High (7.5)Published
CVE-2026-90885 lets an external sender read local files and trigger server-side requests when Apache Camel Saxon evaluates XQuery over an untrusted stream-based Source body.
- Affected
- Apache Camel Saxon 4.0.0–4.18.4 and 4.19.0–4.22.1
- Attack requirements
- Ability to send untrusted XML that reaches an XQuery expression or xquery endpoint as a stream-based javax.xml.transform.Source body
Impact
An attacker can read files accessible to the Camel process and cause requests to attacker-selected hosts through external entity resolution. Apache assigns a CVSS 3.1 score of 7.5.
Technical detail
- XQueryBuilder creates its default Saxon Configuration without disabling DOCTYPE declarations, external entities, or external DTD loading.
- String, byte[], and InputStream bodies pass through Camel's hardened XML converters. A body already supplied as a Source bypasses those converters and is parsed with Saxon's defaults when parsing is still required.
- Routes using convertBodyTo(Source.class), or an upstream component or processor that supplies a stream-based Source, can expose this path without enabling a non-default option.
- This issue is separate from the camel-xpath InputSource XXE in CVE-2026-85250; its fix in 4.22.1 does not address the Saxon path.
Remediation
- Upgrade to Apache Camel 4.18.5, 4.22.2, or 4.23.0 and later on the corresponding release line; move unsupported releases to a supported line.
- Until upgrading, prevent untrusted XML from reaching XQuery as an already-built Source, or supply a Saxon Configuration that rejects DOCTYPE declarations and disables external general entities, external parameter entities, and external DTD loading.
- Apply the same parser restrictions to any custom Saxon Configuration, including on fixed releases: Camel hardens only its default Configuration and leaves supplied configurations unchanged.