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)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.apache.calcite.avatica » avatica-core | < 1.22.0 | 1.22.0 |
Blast radius
49% of the dependent artifacts (992) still pull an affected version in their latest release.
| Depth | Dependent 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
- org.apache.spark » spark-sql3,176 usages
- org.apache.spark » spark-core2,900 usages
- org.apache.spark » spark-mllib831 usages
- org.apache.hive » hive-exec699 usages
- org.apache.spark » spark-streaming670 usages
- org.apache.spark » spark-hive633 usages
- org.apache.spark » spark-catalyst503 usages
- org.apache.solr » solr-core500 usages
- org.apache.hive » hive-metastore480 usages
- org.apache.flink » flink-table-planner471 usages
- org.apache.calcite » calcite-core414 usages
- org.apache.hive » hive-jdbc404 usages
- org.apache.hive » hive-common305 usages
- org.apache.hive » hive-service301 usages
- org.apache.flink » flink-table-runtime283 usages
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.
References
| Advisory | NVD CVE-2022-36364 | nvd.nist.gov |
| Package | apache/calcite-avatica | github.com |
| Web | apache/calcite-avatica commit 0c097b6 | github.com |
| Web | thread/5csdj8bv4h3hfgw27okm84jh1j2fyw0c | lists.apache.org |
| Web | lists/oss-security/2022/07/28/1 | openwall.com |
