Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B7B810BCD for ; Tue, 3 Mar 2015 20:51:05 +0000 (UTC) Received: (qmail 83879 invoked by uid 500); 3 Mar 2015 20:51:05 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 83839 invoked by uid 500); 3 Mar 2015 20:51:05 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 83826 invoked by uid 99); 3 Mar 2015 20:51:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 20:51:05 +0000 Date: Tue, 3 Mar 2015 20:51:05 +0000 (UTC) From: =?utf-8?Q?Christian_M=C3=BCller_=28JIRA=29?= To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-8312) XML External Entity (XXE) issue in XPath MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8312?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian M=C3=BCller updated CAMEL-8312: ------------------------------------ Summary: XML External Entity (XXE) issue in XPath (was: XML External E= ntity (XXE) injection in XPath) > XML External Entity (XXE) issue in XPath > ---------------------------------------- > > Key: CAMEL-8312 > URL: https://issues.apache.org/jira/browse/CAMEL-8312 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.13.3, 2.14.1 > Reporter: Stephan Siano > Assignee: Claus Ibsen > Fix For: 2.13.4, 2.14.3, 2.15.0 > > Attachments: 0001-CAMEL-8312-XXE-vulnerability-in-XPath-evaluator= .patch > > > If the documentType of an XPath expression is set to a class for that no = type converter exists and the data to which the expression is applied is of= type WrappedFile or String the XPath will seem to work anyway. However thi= s setup will make the scenario susceptible to XXE injection attacks (becaus= e the InputSource created from the String or Generic file will be parsed by= a default parser within the XPath evaluation and the XXE will succeed. > Even worse, if the documentType is Document (the default) and the DOM par= sing fails because the document is invalid and contains an XXE injection th= is will allow DOS attacks on the system. > The two unit tests contained in the patch show these two use cases (and t= hrow a FileNotFoundException on an unchanged XPath builder). > As a side effect the Exception in the XPathFeatureTest.testXPath changes = (because initially there are errors during type conversion and during XPath= evaluation whereas after the patch processing is stopped after the type co= nversion error). -- This message was sent by Atlassian JIRA (v6.3.4#6332)