Vulnerabilities in pkg:maven/org.apache.calcite/calcite-core
PACKAGECVE-2022-39135 is a CRITICAL (CVSS 9.8) apache calcite before 1.32.0 vulnerable vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Calcite core libraries in the Maven ecosystem. The issue involves apache calcite before 1.32.0 vulnerable to potential xml external entity (xxe) attack. Remediation is available by upgrading affected packages to version 1.32.0.
pkg:maven/org.apache.calcite/calcite-core
Vulnerability advisories affecting package pkg:maven/org.apache.calcite/calcite-core. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-fj2m-w3wv-x9pr | CVE-2022-39135 | CRITICAL | Apache Calcite before 1.32.0 vulnerable to potential XML External Entity (XXE) attack |
| GHSA-c2rv-hwqm-wjpg | CVE-2026-46718 | MODERATE | Apache Calcite is Vulnerable to Use of Externally-Controlled Input to Select Classes |
| GHSA-hxp5-8pgq-mgv9 | CVE-2020-13955 | MODERATE | Missing Authentication for Critical Function in Apache Calcite |
CVE-2022-39135 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-39135
To remediate this vulnerability, upgrade all affected Calcite 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.
<dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<version>1.32.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.calcite
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-39135, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.calcite
Analyze the terminal output to locate any version of Calcite core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.32.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.calcite 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Calcite 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
CVE-2022-39135 Affected Calcite core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.calcite:calcite-core
|
Maven |
≥ 1.22.0
< 1.32.0
|
1.32.0
|
References
Frequently Asked Questions
What is CVE-2022-39135?
Which Calcite core versions are affected?
What version fixes CVE-2022-39135?
Is calcite-core affected?
What is the CVSS score of CVE-2022-39135?
What CWE is associated with CVE-2022-39135?
How can I check Maven dependencies for CVE-2022-39135?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fj2m-w3wv-x9pr",
"modified" : "2026-09-29T21:27:06Z",
"published" : "2022-09-12T00:00:34Z",
"aliases" : [ "CVE-2022-39135" ],
"summary" : "Apache Calcite before 1.32.0 vulnerable to potential XML External Entity (XXE) attack",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.calcite:calcite-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.22.0"
}, {
"fixed" : "1.32.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39135"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/calcite/commit/1ddc1c3a0c61"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/calcite/commit/ba80b9156afc0db26b194d97a031fcc0dc7f4c03"
}, {
"type" : "WEB",
"url" : "https://calcite.apache.org/news/2022/09/10/release-1.32.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/calcite"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/calcite/blob/calcite-1.22.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/calcite/blob/calcite-1.31.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/calcite/blob/calcite-1.32.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/calcite/tree/calcite-1.19.0/core/src/main/java/org/apache/calcite/runtime"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/CALCITE-5263"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/ohdnhlgm6jvt3srw8l7spkm2d5vwm082"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHECALCITE-3021143"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2022/11/21/3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-15T03:28:19Z",
"nvd_published_at" : "2022-09-11T12:15:00Z"
}
}