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
- CVSS: 8.8 (high)
- EPSS: 99.06% chance of exploitation in the next 30 days
- CISA KEV: Not listed
- Published: 2021-01-29
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
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.
- Find the Druid version in the web console (top right) or in the druid-server jar version under lib/.
- 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.
- Keep druid.javascript.enabled set to false in common.runtime.properties unless you need it.
- Turn on authentication and authorisation for the Druid APIs and console, and keep port 8888 and the service ports off the internet.
- 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.