Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EC487200CED for ; Thu, 3 Aug 2017 09:07:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EAA34169DFD; Thu, 3 Aug 2017 07:07:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3DF1C169E2E for ; Thu, 3 Aug 2017 09:07:11 +0200 (CEST) Received: (qmail 53749 invoked by uid 500); 3 Aug 2017 07:07:10 -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 53735 invoked by uid 99); 3 Aug 2017 07:07:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 07:07:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DBB381A08FD for ; Thu, 3 Aug 2017 07:07:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 16GwNpubMpOq for ; Thu, 3 Aug 2017 07:07:09 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id CAE7F60E75 for ; Thu, 3 Aug 2017 07:07:08 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C8F62E0E70 for ; Thu, 3 Aug 2017 07:07:06 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7A2CE24DCF for ; Thu, 3 Aug 2017 07:07:02 +0000 (UTC) Date: Thu, 3 Aug 2017 07:07:02 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-11625) Potential SQL injection in JdbcAggregationRepository MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 03 Aug 2017 07:07:12 -0000 [ https://issues.apache.org/jira/browse/CAMEL-11625?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D161= 12307#comment-16112307 ]=20 Claus Ibsen commented on CAMEL-11625: ------------------------------------- And btw its the repository name, that the end user himself configures, its = not like a dynamic part of a message etc. So any risk is very low. > Potential SQL injection in JdbcAggregationRepository > ---------------------------------------------------- > > Key: CAMEL-11625 > URL: https://issues.apache.org/jira/browse/CAMEL-11625 > Project: Camel > Issue Type: Improvement > Components: camel-sql > Reporter: Aur=C3=A9lien Pupier > Fix For: Future > > > Quoting Sonar: > "Applications that execute SQL commands should neutralize any externally-= provided values used in those commands. Failure to do so could allow an att= acker to include input that changes the query so that unintended commands a= re executed, or sensitive data is exposed." > it is the case at 2 places: > https://github.com/apache/camel/blame/master/components/camel-sql/src/mai= n/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.= java#L288 > https://github.com/apache/camel/blame/master/components/camel-sql/src/mai= n/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.= java#L357 > the only variable thing is the "repositoryName" so maybe there are some v= alidation previously which will avoid to users to inject sql code or it is = something that only the Camel developer can configure? > even if it is the case, it might be a good idea to use some "preparedStat= ement" to avoid sql injection in case previous assumptions are no more true > I reported here because I didn't see any "security" options on the Camel = open source JIRA. -- This message was sent by Atlassian JIRA (v6.4.14#64029)