CVE-2021-26920
JSON

6.5medium

Apache Druid: The HTTP inputSource allows authenticated users to read data from other sources than intended

Severity
6.5medium CVSS:3.1 by NVD
Exploit likelihood
9.50% (higher than 95% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-793h-6f7r-6qvmGHSA-x3cc-x39p-42qx

Description

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.

Affected

Product or packageVersionsReported by
Apache Software Foundation Apache Druidfrom Apache Druid up to 0.20.2CVE List
org.apache.druid:druid-core (Maven)before 0.21.0GitHub Advisory Database
fast-xml-parser (npm)before 4.1.2GitHub Advisory Database
apache druidbefore 0.22.0NVD

All scores

GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:N/A:N

Classification

What each source says

CVE List

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.

GitHub Advisory Database
Impact

As a part of this vulnerability, user was able to se code using __proto__ as a tag or attribute name.

const { XMLParser, XMLBuilder, XMLValidator} = require("fast-xml-parser");

let XMLdata = "<__proto__><polluted>hacked</polluted></__proto__>"

const parser = new XMLParser();
let jObj = parser.parse(XMLdata);

console.log(jObj.polluted) // should return hacked
Patches

The problem has been patched in v4.1.2

Workarounds

User can check for "proto" in the XML string before parsing it to the parser.

References

https://gist.github.com/Sudistark/a5a45bd0804d522a1392cb5023aa7ef7

NVD (es)

En el sistema de ingestión de Druid, el InputSource es usado para leer datos de una determinada fuente de datos. Sin embargo, el HTTP InputSource permite a usuarios autenticados leer datos de otras fuentes distintas a las previstas, como el sistema de archivos local, con los privilegios del proceso del servidor Druid. Esto no es una elevación de privilegios cuando unos usuarios acceden a Druid directamente, ya que Druid también proporciona el InputSource Local, que permite el mismo nivel de acceso. Pero es problemático cuando unos usuarios interactúan con Druid indirectamente mediante una aplicación que permite a usuarios especificar el HTTP InputSource, pero no el Local InputSource. En este caso, unos usuarios podrían omitir la restricción a nivel de aplicación pasando una URL de archivo al HTTP InputSource

References

https://lists.apache.org/thread.html/r29e45561343cc5cf7d3290ee0b0e94e565faab19c20d022df9b5e29c%40%3Cdev.druid.apache.org%3Emailing-list, vendor-advisory, web
http://www.openwall.com/lists/oss-security/2021/07/02/1mailing-list, third-party-advisory, web
https://lists.apache.org/thread.html/r61aab724cf97d80da7f02d50e9af6de5c7c40dd92dab7518746fbaa2%40%3Cannounce.apache.org%3Emailing-list
https://lists.apache.org/thread.html/rc9400a70d0ec5cdb8a3486fc5ddb0b5282961c0b63e764abfbcb9f5d%40%3Cdev.druid.apache.org%3Emailing-list
http://www.openwall.com/lists/oss-security/2021/09/24/1mailing-list, third-party-advisory, web
https://lists.apache.org/thread.html/r304dfe56a5dfe1b2d9166b24d2c74ad1c6730338b20aef77a00ed2be%40%3Cannounce.apache.org%3Emailing-list
https://nvd.nist.gov/vuln/detail/CVE-2021-26920advisory
https://lists.apache.org/thread.html/r304dfe56a5dfe1b2d9166b24d2c74ad1c6730338b20aef77a00ed2be@%3Cannounce.apache.org%3Eweb
https://lists.apache.org/thread.html/r61aab724cf97d80da7f02d50e9af6de5c7c40dd92dab7518746fbaa2@%3Cannounce.apache.org%3Eweb
https://lists.apache.org/thread.html/rc9400a70d0ec5cdb8a3486fc5ddb0b5282961c0b63e764abfbcb9f5d@%3Cdev.druid.apache.org%3Eweb
https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-x3cc-x39p-42qxweb
https://nvd.nist.gov/vuln/detail/CVE-2023-26920advisory

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-26920 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-793h-6f7r-6qvm changed 2026-07-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-x3cc-x39p-42qx changed 2026-07-08CC-BY-4.0
NVDCVE-2021-26920 changed 2026-06-17Public domain