Rapid7 Vulnerability & Exploit Database

Apache Druid 0.20.0 Remote Command Execution

Back to Search

Apache Druid 0.20.0 Remote Command Execution

Disclosed
01/21/2021
Created
04/26/2021

Description

Apache Druid includes the ability to execute user-provided JavaScript code embedded in various types of requests; however, that feature is disabled by default. In Druid versions prior to `0.20.1`, an authenticated user can send a specially-crafted request that both enables the JavaScript code-execution feature and executes the supplied code all at once, allowing for code execution on the server with the privileges of the Druid Server process. More critically, authentication is not enabled in Apache Druid by default. Tested on the following Apache Druid versions: * 0.15.1 * 0.16.0-iap8 * 0.17.1 * 0.18.0-iap3 * 0.19.0-iap7 * 0.20.0-iap4.1 * 0.20.0 * 0.21.0-iap3

Author(s)

  • Litch1, Security Team of Alibaba Cloud
  • je5442804

Platform

Linux,Unix

Architectures

cmd, x86, x64

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/apache_druid_js_rce
msf exploit(apache_druid_js_rce) > show targets
    ...targets...
msf exploit(apache_druid_js_rce) > set TARGET < target-id >
msf exploit(apache_druid_js_rce) > show options
    ...show and set options...
msf exploit(apache_druid_js_rce) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;