// For flags

CVE-2022-36364

Apache Calcite Avatica JDBC driver `httpclient_impl` connection property can be used as an RCE vector

Severity Score

8.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Apache Calcite Avatica JDBC driver creates HTTP client instances based on class names provided via `httpclient_impl` connection property; however, the driver does not verify if the class implements the expected interface before instantiating it, which can lead to code execution loaded via arbitrary classes and in rare cases remote code execution. To exploit the vulnerability: 1) the attacker needs to have privileges to control JDBC connection parameters; 2) and there should be a vulnerable class (constructor with URL parameter and ability to execute code) in the classpath. From Apache Calcite Avatica 1.22.0 onwards, it will be verified that the class implements the expected interface before invoking its constructor.

El driver JDBC de Apache Calcite Avatica crea instancias de clientes HTTP basadas en nombres de clase proporcionados por medio de la propiedad de conexión "httpclient_impl"; sin embargo, el driver no verifica si la clase implementa la interfaz esperada antes de instanciarla, lo que puede conllevar a una ejecución de código cargado por medio de clases arbitrarias y, en casos raros, la ejecución de código remoto. Para explotar la vulnerabilidad: 1) el atacante necesita tener privilegios para controlar los parámetros de conexión JDBC; 2) y debe haber una clase vulnerable (constructor con parámetro URL y capacidad de ejecución de código) en el classpath. A partir de Apache Calcite Avatica 1.22.0, será comprobado que la clase implementa la interfaz esperada antes de invocar su constructor

*Credits: Apache Calcite Avatica would like to thank Peter M (https://twitter.com/h1pmnh) for reporting this issue
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-07-21 CVE Reserved
  • 2022-07-28 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-10-19 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-665: Improper Initialization
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Apache
Search vendor "Apache"
Apache Calcite Avatica
Search vendor "Apache" for product "Apache Calcite Avatica"
< 1.22.0
Search vendor "Apache" for product "Apache Calcite Avatica" and version " < 1.22.0"
-
Affected