Apache Druid < 0.20.1 RCE (Direct Check) - Nessus

High   Plugin ID: 148241

This page contains detailed information about the Apache Druid < 0.20.1 RCE (Direct Check) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 148241
Name: Apache Druid < 0.20.1 RCE (Direct Check)
Filename: apache_druid_cve-2021-25646.nbin
Vulnerability Published: 2021-01-29
This Plugin Published: 2021-03-30
Last Modification Time: 2022-04-25
Plugin Version: 1.14
Plugin Type: remote
Plugin Family: Web Servers
Dependencies: apache_druid_detect.nbin
Required KB Items [?]: installed_sw/Apache Druid

Vulnerability Information


Severity: High
Vulnerability Published: 2021-01-29
Patch Published: 2021-01-29
CVE [?]: CVE-2021-25646
CPE [?]: cpe:/a:apache:druid

Synopsis

The web application running on the remote web server is affected by a remote code execution vulnerability.

Description

A change introduced in Apache Druid prior to 0.20.1 allows attackers to execute user-provided JavaScript code embedded in various types of requests. This functionality is intended for use in high-trust environments, and is disabled by default. However, in Druid 0.20.0 and earlier, it is possible for an unauthenticated user to send a specially-crafted request that forces Druid to run user-provided JavaScript code for that request, regardless of server configuration. This can be leveraged to execute code on the target machine with the privileges of the Druid server process.

Solution

Upgrade to Druid 0.20.1 or later

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Apache Druid < 0.20.1 RCE (Direct Check) vulnerability:

  1. Metasploit: exploit/linux/http/apache_druid_js_rce
    [Apache Druid 0.20.0 Remote Command Execution]
  2. GitHub: https://github.com/1n7erface/PocList
    [CVE-2021-25646: Alibaba-Nacos-Unauthorized/ApacheDruid-RCE_CVE-2021-25646/MS-Exchange-SSRF-CVE-2021-2 ...]
  3. GitHub: https://github.com/AirEvan/CVE-2021-25646-GUI
    [CVE-2021-25646: CSharp CVE-2021-25646-GUI]
  4. GitHub: https://github.com/Ares-X/VulWiki
    [CVE-2021-25646]
  5. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2021-25646]
  6. GitHub: https://github.com/EdgeSecurityTeam/Vulnerability
    [CVE-2021-25646]
  7. GitHub: https://github.com/FDlucifer/firece-fish
    [CVE-2021-25646]
  8. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2021-25646]
  9. GitHub: https://github.com/SouthWind0/southwind0.github.io
    [CVE-2021-25646]
  10. GitHub: https://github.com/Vulnmachines/Apache-Druid-CVE-2021-25646
    [CVE-2021-25646]
  11. GitHub: https://github.com/W4nde3/toolkits
    [CVE-2021-25646]
  12. GitHub: https://github.com/dnr6419/Druid_docker
    [CVE-2021-25646]
  13. GitHub: https://github.com/errorecho/CVEs-Collection
    [CVE-2021-25646]
  14. GitHub: https://github.com/fardeen-ahmed/Bug-bounty-Writeups
    [CVE-2021-25646]
  15. GitHub: https://github.com/gobysec/Goby
    [CVE-2021-25646]
  16. GitHub: https://github.com/j2ekim/CVE-2021-25646
    [CVE-2021-25646: Apache Druid remote code execution vulnerability - Apache Druid ...]
  17. GitHub: https://github.com/j2ekim/cve-2021-25646
    [CVE-2021-25646: Apache Druid remote code execution vulnerability - Apache Druid 远程代码执行漏洞利用]
  18. GitHub: https://github.com/lp008/CVE-2021-25646
    [CVE-2021-25646]
  19. GitHub: https://github.com/ltfafei/my_POC
    [CVE-2021-25646]
  20. GitHub: https://github.com/xm88628/AfternoonTea
    [CVE-2021-25646]
  21. GitHub: https://github.com/givemefivw/CVE-2021-25646
    [CVE-2021-25646: CVE-2021-25646 Apache Druid 远程代码执行漏洞 Wker脚本]
  22. GitHub: https://github.com/Ormicron/CVE-2021-25646-GUI
    [CVE-2021-25646: CSharp CVE-2021-25646-GUI]
  23. GitHub: https://github.com/yaunsky/cve-2021-25646
    [CVE-2021-25646: Apache Druid 远程代码执行;检测脚本]
  24. GitHub: https://github.com/Yang0615777/PocList
    [CVE-2021-25646: Alibaba-Nacos-Unauthorized/ApacheDruid-RCE_CVE-2021-25646/MS-Exchange-SSRF-CVE-2021-2 ...]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2021-25646
CVSS V2 Vector: AV:N/AC:L/Au:S/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:9.0 (High)
Impact Subscore:10.0
Exploitability Subscore:8.0
CVSS Temporal Score:7.4 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.4 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:8.8 (High)
Impact Subscore:5.9
Exploitability Subscore:2.8
CVSS Temporal Score:8.2 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.2 (High)

Go back to menu.

Plugin Source


The apache_druid_cve-2021-25646.nbin Nessus plugin is distributed in a propriatory binary format and its source code is protected. This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/apache_druid_cve-2021-25646.nbin
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\apache_druid_cve-2021-25646.nbin
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/apache_druid_cve-2021-25646.nbin

Go back to menu.

How to Run


Here is how to run the Apache Druid < 0.20.1 RCE (Direct Check) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Web Servers plugin family.
  6. On the right side table select Apache Druid < 0.20.1 RCE (Direct Check) plugin ID 148241.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl apache_druid_cve-2021-25646.nbin -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a apache_druid_cve-2021-25646.nbin -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - apache_druid_cve-2021-25646.nbin -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state apache_druid_cve-2021-25646.nbin -t <IP/HOST>

Go back to menu.

References


CWE | Common Weakness Enumeration:
  • CWE-732 (Weakness) Incorrect Permission Assignment for Critical Resource
See also: Similar and related Nessus plugins:
  • 11030 - Apache Chunked Encoding Remote Overflow
  • 111788 - Apache 2.4.x < 2.4.34 Multiple Vulnerabilities
  • 11408 - Apache 2.0.x < 2.0.43 Multiple Vulnerabilities (Log Injection, Source Disc.)
  • 117807 - Apache 2.4.x < 2.4.35 DoS
  • 121355 - Apache 2.4.x < 2.4.38 Multiple Vulnerabilities
  • 122059 - Apache 2.4.17 / 2.4.18 DoS
  • 122060 - Apache 2.4.x < 2.4.33 Multiple Vulnerabilities
  • 12239 - Apache < 1.3.31 / 2.0.49 Log Entry Terminal Escape Sequence Injection
  • 123642 - Apache 2.4.x < 2.4.39 Multiple Vulnerabilities
  • 128033 - Apache 2.4.x < 2.4.41 Multiple Vulnerabilities
  • 135290 - Apache 2.4.x < 2.4.42 Multiple Vulnerabilities
  • 136931 - Apache Traffic Server - HTTP Smuggling and Cache poisoning
  • 139574 - Apache 2.4.x < 2.4.46 Multiple Vulnerabilities
  • 144969 - Apache Unomi RCE (Direct Check)
  • 146314 - Apache Flink local file inclusion Vulnerability (direct check)
  • 14771 - Apache <= 1.3.33 htpasswd Local Overflow
  • 148239 - Apache OFBiz Remote Code Execution (CVE-2021-26295)
  • 150280 - Apache 2.4.x < 2.4.47 Multiple Vulnerabilities
  • 153583 - Apache < 2.4.49 Multiple Vulnerabilities
  • 153585 - Apache >= 2.4.17 < 2.4.49 mod_http2
  • 153884 - Apache 2.4.49 < 2.4.50 Multiple Vulnerabilities
  • 153952 - Apache 2.4.49 < 2.4.51 Path Traversal Vulnerability
  • 155998 - Apache Log4j Message Lookup Substitution RCE (Log4Shell) (Direct Check)
  • 156014 - Apache Log4Shell RCE detection via callback correlation (Direct Check HTTP)
  • 156164 - Apache Log4Shell CVE-2021-45046 Bypass Remote Code Execution
  • 31654 - Apache < 1.3.37 mod_rewrite LDAP Protocol URL Handling Overflow
  • 31655 - Apache < 2.0.59 mod_rewrite LDAP Protocol URL Handling Overflow
  • 31659 - Apache < 2.2.3 mod_rewrite LDAP Protocol URL Handling Overflow
  • 33477 - Apache 2.2.x < 2.2.9 Multiple Vulnerabilities (DoS, XSS)
  • 34433 - Apache mod_proxy_ftp Directory Component Wildcard Character Globbing XSS
  • 40467 - Apache 2.2.x < 2.2.12 Multiple Vulnerabilities
  • 42052 - Apache 2.2.x < 2.2.14 Multiple Vulnerabilities
  • 45004 - Apache 2.2.x < 2.2.15 Multiple Vulnerabilities
  • 48205 - Apache 2.2.x < 2.2.16 Multiple Vulnerabilities

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file apache_druid_cve-2021-25646.nbin version 1.14. For more plugins, visit the Nessus Plugin Library.

Go back to menu.