[ 
https://issues.apache.org/jira/browse/CALCITE-5218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17572288#comment-17572288
 ] 

Ruben Q L commented on CALCITE-5218:
------------------------------------

CVE-2022-36364: Apache Calcite Avatica JDBC driver `httpclient_impl` connection 
property can be used as an RCE vector

Severity: moderate

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.

Credit:

Apache Calcite Avatica would like to thank Peter M (https://twitter.com/h1pmnh) 
for reporting this issue

> Verify HTTP client class before instantiating it 
> -------------------------------------------------
>
>                 Key: CALCITE-5218
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5218
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>            Reporter: Ruben Q L
>            Assignee: Ruben Q L
>            Priority: Major
>             Fix For: avatica-1.22.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Verify HTTP client class before instantiating it 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to