HIGH 8.8

CVE-2022-36364

Apache Calcite Avatica JDBC driver arbitrary code execution

Description

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.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.apache.calcite.avatica » avatica-core
< 1.22.0
1.22.0

Blast radius

1affected artifacts
2,600affected versions
1,995dependent artifacts (est.)
230,881dependent versions

49% of the dependent artifacts (992) still pull an affected version in their latest release.

DepthDependent versions
Direct
30,913
2 hops
39,786
3 hops
91,863
4 hops
48,245
5 hops
14,971
6 hops
5,103

Most used dependents

Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.