{"id":"CVE-2026-85250","kind":"vulnerability","aliases":["CVE-2026-85250"],"related":[],"title":"Apache Camel: XPath InputSource mode lets XML external entities read files","description":"Improper Restriction of XML External Entity Reference vulnerability in Apache Camel XPath component.\n\nThis issue affects Apache Camel: from 4.0.0 before 4.18.5, from 4.19.0 before 4.22.1.\n\nWith documentType set to InputSource, XPathBuilder handed the payload straight to javax.xml.xpath, which builds a DocumentBuilder of its own using the JDK defaults. The hardening applied to Camel's default document type was therefore bypassed: a DOCTYPE declaration that is refused on the default type was accepted here, and the external entity it declared was resolved and expanded into the evaluated document. An external sender whose XML reaches such an expression could read files readable by the Camel process and cause the process to issue requests to hosts it names. The two document types disagreeing on parser configuration is what made this reachable, since a deployment choosing InputSource for streaming reasons had no indication it was also choosing a weaker parser.\n\nUpgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.18.x LTS releases stream should upgrade to 4.18.5. Users on the 4.22.x LTS releases stream should upgrade to 4.22.1. The InputSource document type now goes through the same hardened parser as the default type, so a DOCTYPE is refused. Note that it also shares that type's documented escape hatch: the same DocumentBuilderFactory system properties that relax the default type relax this one, so a deployment that has set them remains unprotected by design. 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.","summary":"Apache Camel's XPath component, when set to documentType=InputSource, skipped the XML hardening used by its default mode, so a DOCTYPE with an external entity was accepted and expanded. An external sender can read files the Camel process can read and make it request hosts of the attacker's choosing.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["apache-camel","java","package","self-hosted","xpath"],"not_affected_if":["camel-upgraded","default-document-type","trusted-input-only"],"how_to_check":"- Search Camel routes and code for `documentType=InputSource` or `XPathBuilder` set to InputSource on expressions that evaluate untrusted XML.\n- Check the Camel version in the build file, for example `camel-xpath` in Maven or Gradle, against `4.18.5` or `4.22.1`.\n- Check whether the DocumentBuilderFactory system properties that relax XML parsing are set in the JVM.","fix":"- Upgrade Apache Camel to `4.23.0`, or to `4.18.5` on the 4.18.x LTS stream, or to `4.22.1` on the 4.22.x LTS stream.\n- Until upgraded, stop using `documentType=InputSource` on expressions evaluated over untrusted XML; the default document type already refuses a DOCTYPE.","status":"open","published_at":"2026-10-19T11:17:23+00:00","first_seen_at":"2026-10-23T21:57:18+00:00","triaged_at":"2026-10-25T03:23:14+00:00","updated_at":"2026-10-25T03:23:14+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-25T03:23:14Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Apache Camel to `4.23.0`, or to `4.18.5` on the 4.18.x LTS stream, or to `4.22.1` on the 4.22.x LTS stream.\n- Until upgraded, stop using `documentType=InputSource` on expressions evaluated over untrusted XML; the default document type already refuses a DOCTYPE.","reach":"network","title":"Apache Camel: XPath InputSource mode lets XML external entities read files","impact":"medium","summary":"Apache Camel's XPath component, when set to documentType=InputSource, skipped the XML hardening used by its default mode, so a DOCTYPE with an external entity was accepted and expanded. An external sender can read files the Camel process can read and make it request hosts of the attacker's choosing.","category":"package","nicknames":[],"who_cares":["java","apache-camel","xpath","self-hosted"],"confidence":0.8,"needs_auth":"no","worst_case":"Attacker reads server files and triggers outbound requests to chosen hosts.","analyst_note":"","how_to_check":"- Search Camel routes and code for `documentType=InputSource` or `XPathBuilder` set to InputSource on expressions that evaluate untrusted XML.\n- Check the Camel version in the build file, for example `camel-xpath` in Maven or Gradle, against `4.18.5` or `4.22.1`.\n- Check whether the DocumentBuilderFactory system properties that relax XML parsing are set in the JVM.","needs_analyst":false,"not_affected_if":["default-document-type","trusted-input-only","camel-upgraded"],"who_is_affected":"Only deployments that use Apache Camel from 4.0.0 before 4.18.5 or from 4.19.0 before 4.22.1 and evaluate XPath with documentType set to InputSource on XML from outside the trust boundary are exposed. Deployments on the default document type are not affected by this flaw, and deployments that only process trusted XML can deprioritise it.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.00074,"input_tokens":3773,"output_tokens":725,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-85250':14A,17A '4.0.0':97C '4.18':237C '4.18.5':99C,245C '4.19.0':101C '4.22':249C '4.22.1':103C,257C '4.23.0':229C 'accept':54B,150C 'affect':93C 'alreadi':334C 'also':220C,281C 'apach':1A,19B,27B,87C,94C,227C 'apache-camel':18B 'appli':129C 'attack':75B 'build':117C 'bypass':138C 'camel':2A,20B,28B,64B,88C,95C,131C,181C,228C 'cannot':316C 'caus':184C 'choos':77B,210C,221C 'compon':31B,90C 'configur':201C 'could':175C 'cve':12A,15A 'declar':141C,157C 'default':44B,126C,133C,147C,271C,297C,331C 'deploy':209C,304C,314C 'design':312C 'disagre':198C 'doctyp':48B,140C,275C,337C 'document':134C,165C,196C,260C,286C,332C 'documentbuild':119C 'documentbuilderfactori':291C 'documenttyp':35B,105C,322C 'entiti':9A,52B,83C,155C 'escap':287C 'evalu':164C,326C 'expand':56B,161C 'express':174C,325C 'extern':8A,51B,58B,82C,154C,167C 'file':11A,62B,177C 'fix':231C 'goe':263C 'hand':110C 'harden':40B,128C,267C 'hatch':288C 'host':25B,72B,191C 'immedi':318C 'improp':78C 'indic':217C 'inputsourc':4A,36B,108C,211C,259C,323C 'issu':92C,188C,233C 'java':21B 'javax.xml.xpath':115C 'jdk':125C 'let':6A 'lts':239C,251C 'made':204C 'make':69B 'mode':5A,45B 'name':193C 'note':278C 'one':301C 'packag':22B 'parser':200C,224C,268C 'payload':112C 'process':65B,182C,186C 'properti':293C 'reach':171C 'reachabl':206C 'read':10A,61B,67B,176C 'readabl':178C 'reason':214C 'refer':84C 'refus':144C,277C,335C 'relax':295C,299C 'releas':240C,252C 'remain':309C 'request':71B,189C 'resolv':159C 'restrict':79C 'self':24B 'self-host':23B 'sender':59B,168C 'set':33B,106C,307C 'share':282C 'sinc':207C 'skip':37B 'straight':113C 'stream':213C,241C,253C 'system':292C 'therefor':137C 'two':195C 'type':135C,148C,197C,261C,272C,284C,298C,333C 'unprotect':310C 'untrust':328C 'upgrad':225C,243C,255C,317C 'use':41B,123C,321C 'user':234C,246C 'vulner':85C 'weaker':223C 'whose':169C 'x':238C,250C 'xml':7A,39B,81C,170C,329C 'xpath':3A,26B,30B,89C 'xpathbuild':109C","nicknames":[],"mitigations":[],"who_affected":"Only deployments that use Apache Camel from 4.0.0 before 4.18.5 or from 4.19.0 before 4.22.1 and evaluate XPath with documentType set to InputSource on XML from outside the trust boundary are exposed. Deployments on the default document type are not affected by this flaw, and deployments that only process trusted XML can deprioritise it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-19T11:17:23+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","cvss_by":"security@apache.org","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-85250","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85250","severity":null,"published_at":"2026-10-19T11:17:23+00:00","modified_at":"2026-10-19T20:45:51+00:00","first_seen_at":"2026-10-23T21:57:18+00:00","fetched_at":"2026-10-23T22:28:57+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}