CVE-2022-39135
JSON

9.8critical

Apache Calcite: potential XEE attacks

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
2.90% (higher than 87% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-fj2m-w3wv-x9pr

Description

Apache Calcite 1.22.0 introduced the SQL operators EXISTS_NODE, EXTRACT_XML, XML_TRANSFORM and EXTRACT_VALUE do not restrict XML External Entity references in their configuration, making them vulnerable to a potential XML External Entity (XXE) attack. Therefore any client exposing these operators, typically by using Oracle dialect (the first three) or MySQL dialect (the last one), is affected by this vulnerability (the extent of it will depend on the user under which the application is running). From Apache Calcite 1.32.0 onwards, Document Type Declarations and XML External Entity resolution are disabled on the impacted operators.

Affected

Product or packageVersionsReported by
Apache Software Foundation Apache Calcitefrom 1.22.0 before 1.32.0CVE List
org.apache.calcite:calcite-core (Maven)from 1.22.0 before 1.32.0GitHub Advisory Database
apache calcitefrom 1.22.0 before 1.32.0NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

What each source says

CVE List

Apache Calcite 1.22.0 introduced the SQL operators EXISTS_NODE, EXTRACT_XML, XML_TRANSFORM and EXTRACT_VALUE do not restrict XML External Entity references in their configuration, making them vulnerable to a potential XML External Entity (XXE) attack. Therefore any client exposing these operators, typically by using Oracle dialect (the first three) or MySQL dialect (the last one), is affected by this vulnerability (the extent of it will depend on the user under which the application is running). From Apache Calcite 1.32.0 onwards, Document Type Declarations and XML External Entity resolution are disabled on the impacted operators.

GitHub Advisory Database

In Apache Calcite prior to version 1.32.0 the SQL operators EXISTS_NODE, EXTRACT_XML, XML_TRANSFORM and EXTRACT_VALUE do not restrict XML External Entity references in their configuration, which makes them vulnerable to a potential XML External Entity (XXE) attack. Therefore any client exposing these operators, typically by using Oracle dialect (the first three) or MySQL dialect (the last one), is affected by this vulnerability (the extent of it will depend on the user under which the application is running). From Apache Calcite 1.32.0 onwards, Document Type Declarations and XML External Entity resolution are disabled on the impacted operators.

NVD (es)

En Apache Calcite versiones anteriores a 1.32.0, los operadores SQL EXISTS_NODE, EXTRACT_XML, XML_TRANSFORM y EXTRACT_VALUE no restringen las referencias de tipo XML External Entity en su configuración, lo que los hace vulnerables a un potencial ataque de tipo External Entity (XXE). Por lo tanto, cualquier cliente que exponga estos operadores, normalmente usando el dialecto de Oracle (los tres primeros) o el de MySQL (el último), está afectado por esta vulnerabilidad (el alcance de la misma dependerá del usuario bajo el que es ejecutada la aplicación). A partir de Apache Calcite versión 1.32.0, las declaraciones de tipo de documento y la resolución de entidades externas XML están deshabilitadas en los operadores afectados

References

https://lists.apache.org/thread/ohdnhlgm6jvt3srw8l7spkm2d5vwm082mailing-list, vendor-advisory, web
http://www.openwall.com/lists/oss-security/2022/11/21/3mailing-list, mitigation, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2022-39135advisory
https://github.com/apache/calcite/commit/1ddc1c3a0c61web
https://github.com/apache/calcite/commit/ba80b9156afc0db26b194d97a031fcc0dc7f4c03web
https://calcite.apache.org/news/2022/09/10/release-1.32.0web
https://github.com/apache/calcitepackage
https://github.com/apache/calcite/blob/calcite-1.22.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.javaweb
https://github.com/apache/calcite/blob/calcite-1.31.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.javaweb
https://github.com/apache/calcite/blob/calcite-1.32.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.javaweb
https://github.com/apache/calcite/tree/calcite-1.19.0/core/src/main/java/org/apache/calcite/runtimeweb
https://issues.apache.org/jira/browse/CALCITE-5263web

Sources

SourceRecordLicence
CVE ListCVE-2022-39135 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-fj2m-w3wv-x9pr changed 2026-09-29CC-BY-4.0
NVDCVE-2022-39135 changed 2026-06-17Public domain