WaratekVRT Sign in

CVE-2022-39135 Apache Calcite

Affected softwareApache Calcite
Severity9.8 Critical CVSS 3.1
Fixed in1.32.0
WeaknessXML external entity (XXE) (CWE-611)
Published11 Sep 2022
Updated17 Jun 2026

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.

Exploitation status

No public exploit

No exploit has been reported in the sources we check. Published 4 years ago.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC none indexed
  • EPSS 2.2% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

  • Protection full XXE
  • Action available security rule
  • Review automated Inferred
  • Record active
Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR xxe security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-611: XML External Entity Reference.

How to mitigate CVE-2022-39135

Upgrade Apache Calcite to 1.32.0 or later. Until you can, Waratek RASP blocks exploitation with its XXE rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.apache.calcite:calcite-core 1.22.0 1.32.0 unbounded

Products and versions

2 products, 2 version entries
SourceVendorProductSchemeAffected versions
nvd apache calcite generic ≥ 1.22.0 and < 1.32.0
osv org.apache.calcite calcite-core generic ≥ 1.22.0 and < 1.32.0

References

URLTags
https://github.com/apache/calcite/commit/1ddc1c3a0c61 WEB
https://github.com/apache/calcite/commit/ba80b9156afc0db26b194d97a031fcc0dc7f4c03 WEB
https://calcite.apache.org/news/2022/09/10/release-1.32.0 WEB
https://github.com/apache/calcite PACKAGE
https://github.com/apache/calcite/blob/calcite-1.22.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java WEB
https://github.com/apache/calcite/blob/calcite-1.31.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java WEB
https://github.com/apache/calcite/blob/calcite-1.32.0/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java WEB
https://github.com/apache/calcite/tree/calcite-1.19.0/core/src/main/java/org/apache/calcite/runtime WEB
https://issues.apache.org/jira/browse/CALCITE-5263 WEB
https://lists.apache.org/thread/ohdnhlgm6jvt3srw8l7spkm2d5vwm082 WEB

Timeline

Published2022-09-11By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.