CVE-2021-26920: Druid core Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-793h-6f7r-6qvm
CVSS 6.5
CWE-863
Published
Advisory Summary

CVE-2021-26920 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-863: Incorrect Authorization) affecting Druid core libraries in the Maven ecosystem. The issue involves druid ingestion system authenticated users can read data from other sources than intended. Remediation is available by upgrading affected packages to version 0.21.0.

CVE-2021-26920 at a Glance

CVE Identifier CVE-2021-26920
GHSA Identifier GHSA-793h-6f7r-6qvm
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Druid core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-26920

To remediate this vulnerability, upgrade all affected Druid core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.druid:druid-core fixed: 0.21.0
<dependency>
    <groupId>org.apache.druid</groupId>
    <artifactId>druid-core</artifactId>
    <version>0.21.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.druid

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-26920, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.druid

Analyze the terminal output to locate any version of Druid core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.21.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.druid command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Druid core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In the Druid ingestion system, the InputSource is used for reading data from a certain data source. However, the HTTP InputSource allows authenticated users to read data from other sources than intended, such as the local file system, with the privileges of the Druid server process. This is not an elevation of privilege when users access Druid directly, since Druid also provides the Local InputSource, which allows the same level of access. But it is problematic when users interact with Druid indirectly through an application that allows users to specify the HTTP InputSource, but not the Local InputSource. In this case, users could bypass the application-level restriction by passing a file URL to the HTTP InputSource.

CVE-2021-26920 Affected Druid core Versions

1 component(s)
Fixed Versions:
0.21.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.druid:druid-core
Maven
< 0.21.0
0.21.0

References

Frequently Asked Questions

What is CVE-2021-26920?
CVE-2021-26920 is a security vulnerability in Druid core involving Druid ingestion system Authenticated users can read data from other sources than intended under CWE-863: Incorrect Authorization.
Which Druid core versions are affected?
Affected versions include releases prior to 0.21.0 across affected packages: org.apache.druid:druid-core.
What version fixes CVE-2021-26920?
Upgrading to 0.21.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is druid-core affected?
Yes, org.apache.druid:druid-core is affected in releases prior to 0.21.0. Upgrade your dependency to 0.21.0 or later.
What is the CVSS score of CVE-2021-26920?
CVE-2021-26920 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-26920?
CVE-2021-26920 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Maven dependencies for CVE-2021-26920?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.druid'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-793h-6f7r-6qvm",
  "modified" : "2023-09-26T13:12:16Z",
  "published" : "2021-08-13T15:21:50Z",
  "aliases" : [ "CVE-2021-26920" ],
  "summary" : "Druid ingestion system Authenticated users can read data from other sources than intended",
  "details" : "In the Druid ingestion system, the InputSource is used for reading data from a certain data source. However, the HTTP InputSource allows authenticated users to read data from other sources than intended, such as the local file system, with the privileges of the Druid server process. This is not an elevation of privilege when users access Druid directly, since Druid also provides the Local InputSource, which allows the same level of access. But it is problematic when users interact with Druid indirectly through an application that allows users to specify the HTTP InputSource, but not the Local InputSource. In this case, users could bypass the application-level restriction by passing a file URL to the HTTP InputSource.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.druid:druid-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.21.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-26920"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r29e45561343cc5cf7d3290ee0b0e94e565faab19c20d022df9b5e29c%40%3Cdev.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r304dfe56a5dfe1b2d9166b24d2c74ad1c6730338b20aef77a00ed2be@%3Cannounce.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r61aab724cf97d80da7f02d50e9af6de5c7c40dd92dab7518746fbaa2@%3Cannounce.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rc9400a70d0ec5cdb8a3486fc5ddb0b5282961c0b63e764abfbcb9f5d@%3Cdev.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2021/07/02/1"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2021/09/24/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-07-06T15:02:28Z",
    "nvd_published_at" : "2021-07-02T08:15:00Z"
  }
}