CVE-2021-25646: Code Injection in Apache Druid

org.apache.druid:druid Updated 02 Oct 2025

Summary

16/06/2021
Yes i
High
8.8

CVE-2021-25646: Code injection in Apache Druid. Affects org.apache.druid:druid versions < 0.20.1. Fixed in 0.20.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Druid is an open-source distributed data store designed for high-performance analytics. It allows users to execute user-provided JavaScript code embedded in various types of requests. This functionality is typically used in high-trust environments and is disabled by default. However, in versions 0.20.0 and earlier, an authenticated user can exploit a vulnerability that forces Druid to run user-provided JavaScript code, regardless of server configuration. This can lead to the execution of arbitrary code on the target machine with the privileges of the Druid server process.

Vulnerability Detail

The vulnerability (CVE-2021-25646) in Apache Druid allows an authenticated user to send a specially-crafted request that triggers the execution of user-provided JavaScript code. This code injection vulnerability bypasses server configuration and can result in the execution of arbitrary code on the target machine. The impact of this vulnerability is high, as it allows an attacker to gain control over the Druid server process and potentially compromise the entire system. The vulnerability has a CVSS score of 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

How To Fix

Latest published version: 38.0.0 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.20.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to disable the execution of user-provided JavaScript code in Druid. This can be done by modifying the server configuration to ensure that the functionality is disabled. However, it is important to note that this workaround may impact the functionality of certain features that rely on the execution of JavaScript code. Therefore, it is recommended to upgrade to the latest version as soon as possible.

Conclusion

The code injection vulnerability in Apache Druid (CVE-2021-25646) allows an authenticated user to execute arbitrary code on the target machine. To mitigate this vulnerability, it is crucial to upgrade to Apache Druid version 0.20.1 or later. Alternatively, disabling the execution of user-provided JavaScript code can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.druid:druid →

Share this vulnerability

FAQ

Apache Druid is an open-source distributed data store designed for high-performance analytics. It allows users to execute user-provided JavaScript code embedded in various types of requests.

The vulnerability allows an authenticated user to execute arbitrary code on the target machine with the privileges of the Druid server process. This can lead to a complete compromise of the system.

No, the code injection functionality is disabled by default. However, in versions 0.20.0 and earlier, a vulnerability allows an attacker to bypass the server configuration and enable the execution of user-provided JavaScript code.

To fix this vulnerability, it is recommended to upgrade to Apache Druid version 0.20.1 or later. This version includes a fix for the code injection vulnerability.

A temporary workaround is to disable the execution of user-provided JavaScript code in Druid by modifying the server configuration. However, it is recommended to upgrade to the latest version as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.druid:druid.

How To Fix

Latest published version: 38.0.0 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.20.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback