Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-85250 Overview
CVE-2026-85250 is an XML External Entity (XXE) vulnerability in the Apache Camel XPath component. When the XPath expression is configured with documentType=InputSource, XPathBuilder passes the payload directly to javax.xml.xpath, which constructs its own DocumentBuilder using JDK defaults. This bypasses the hardening applied to Camel's default document type and permits DOCTYPE declarations and external entity resolution. An external sender whose XML reaches such an expression can read files accessible to the Camel process and force the process to issue outbound requests to attacker-named hosts. The flaw is tracked under CWE-611.
Critical Impact
Attackers can exfiltrate local files readable by the Camel process and coerce server-side requests to arbitrary hosts through crafted XML payloads evaluated by XPath expressions.
Affected Products
- Apache Camel 4.0.0 up to (but not including) 4.18.5
- Apache Camel 4.19.0 up to (but not including) 4.22.1
- Apache Camel routes using XPath expressions with documentType=InputSource
Discovery Timeline
- 2026-10-19 - CVE-2026-85250 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-85250
Vulnerability Analysis
The Apache Camel XPath component exposes a documentType option that controls how input XML is parsed before XPath evaluation. The default document type routes payloads through a hardened parser that refuses DOCTYPE declarations. When developers select InputSource for streaming reasons, XPathBuilder hands the payload directly to javax.xml.xpath. The JDK API internally constructs a DocumentBuilder using default settings, which permit external entity resolution.
As a result, a DOCTYPE declaration that would be refused on the default type is accepted on the InputSource type. The declared external entity is resolved and expanded into the evaluated document. The two document types silently disagree on parser configuration, so operators choosing InputSource for performance reasons have no indication they also chose a weaker parser.
Root Cause
The root cause is inconsistent XML parser hardening across documentType options in XPathBuilder. Camel hardened the default parser against XXE but did not apply equivalent restrictions when the InputSource document type delegates to javax.xml.xpath. The JDK-constructed DocumentBuilder runs with defaults that resolve external entities, classified as [CWE-611] Improper Restriction of XML External Entity Reference.
Attack Vector
An attacker submits an XML document containing a DOCTYPE with an external entity declaration pointing to a local file path or an attacker-controlled URL. When the XML reaches a Camel route whose XPath expression uses documentType=InputSource, the entity is resolved during parsing. File contents accessible to the Camel process are inlined into the evaluated document, enabling disclosure. External entities referencing HTTP or other URL schemes cause the Camel process to issue outbound requests, enabling server-side request forgery against internal services. Exploitation requires only that attacker-influenced XML reach the vulnerable expression.
See the Apache Camel CVE-2026-85250 Advisory and Apache JIRA CAMEL-24475 Issue for authoritative technical details.
Detection Methods for CVE-2026-85250
Indicators of Compromise
- Inbound XML payloads containing <!DOCTYPE declarations with SYSTEM or PUBLIC identifiers referencing file://, http://, or other URL schemes.
- Unexpected outbound HTTP, FTP, or DNS requests originating from the Camel process to hosts named in external entity declarations.
- Camel process reads of sensitive files such as /etc/passwd, /proc/self/environ, or application configuration files outside normal operational patterns.
Detection Strategies
- Audit Camel route definitions and XML DSL for XPath expressions configured with documentType=InputSource.
- Deploy XML content inspection at ingress points to flag DOCTYPE declarations and external entity references in payloads destined for Camel endpoints.
- Correlate Camel application logs with network egress telemetry to identify entity-driven outbound requests.
Monitoring Recommendations
- Monitor Camel JVM processes for anomalous file reads and outbound connections to non-allowlisted destinations.
- Enable XPath component debug logging during triage to capture evaluated expressions and document types.
- Track Apache Camel component version inventory to confirm upgrade coverage across all deployments.
How to Mitigate CVE-2026-85250
Immediate Actions Required
- Upgrade to Apache Camel 4.23.0, which applies the hardened parser to the InputSource document type.
- Users on the 4.18.x LTS stream should upgrade to 4.18.5.
- Users on the 4.22.x LTS stream should upgrade to 4.22.1.
- Inventory all routes using XPath expressions and identify any explicit documentType=InputSource configuration.
Patch Information
The fix routes the InputSource document type through the same hardened parser as the default type, so DOCTYPE declarations are refused. The InputSource type now shares the default type's documented escape hatch: the same DocumentBuilderFactory system properties that relax the default type also relax InputSource. Deployments that have set those system properties remain unprotected by design. Review the GitHub Pull Request #25683, GitHub Pull Request #25940, and GitHub Pull Request #25942 for patch details.
Workarounds
- For deployments that cannot upgrade immediately, do not use documentType=InputSource on expressions evaluated over untrusted XML; the default document type already refuses a DOCTYPE.
- Validate and sanitize inbound XML at ingress to strip DOCTYPE declarations before payloads reach Camel routes.
- Restrict outbound network egress from Camel hosts to an allowlist to limit SSRF and out-of-band exfiltration.
- Review and remove any DocumentBuilderFactory system properties that relax default parser hardening.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

