CVE-2021-25646 in apache druid

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

Apache Druid includes the ability 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 authenticated 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.

Affected software: apache druid

Scores

What LogPulse has for it

How to mitigate it

Upgrade Apache Druid to 0.20.1 or later and keep JavaScript disabled (CVE-2021-25646)

Patch or upgrade. Apache Druid 0.20.0 and earlier let an authenticated user turn on JavaScript in a request and run code on the server, even when JavaScript is disabled in the configuration. Upgrading to 0.20.1 or a current release removes the flaw.

Applies to: Apache Druid 0.20.0 and earlier.

  1. Find the Druid version in the web console (top right) or in the druid-server jar version under lib/.
  2. Upgrade all Druid services (coordinator, overlord, broker, router, historical, middle manager) to 0.20.1 or preferably a current release, following the Druid upgrade notes.
  3. Keep druid.javascript.enabled set to false in common.runtime.properties unless you need it.
  4. Turn on authentication and authorisation for the Druid APIs and console, and keep port 8888 and the service ports off the internet.
  5. If the cluster was reachable before patching, look for unknown processes and files started by the Druid user.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse