CVE-2020-13955: Missing Authentication for Critical Function in Apache Calcite
Summary
CVE-2020-13955: Missing Authentication for Critical Function in Apache Calcite. Affects org.apache.calcite:calcite-core versions < 1.26.0. Fixed in 1.26.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Apache Calcite is a dynamic data management framework that provides a SQL interface for building and executing relational algebra queries. It is widely used in various applications and supports integration with different data sources. However, a vulnerability has been identified in Apache Calcite versions prior to 1.26.0 that could lead to information leakage and potential man-in-the-middle attacks.
Vulnerability Detail
The vulnerability (CVE-2020-13955) stems from the "HttpUtils#getURLConnection" method in Apache Calcite, which disables hostname verification for HTTPS connections. This means that clients using Calcite adapters for Druid and Splunk, as well as other applications utilizing this method, may be vulnerable to man-in-the-middle attacks. An attacker could intercept and manipulate the communication between the client and the server, potentially leading to unauthorized access or data leakage. The issue has been addressed in Apache Calcite 1.26.0, where hostname verification is performed using the default JVM truststore.
How To Fix
Minimum fixed version
1.26.0
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the latest version is not immediately feasible, a temporary workaround is to manually enable hostname verification for HTTPS connections in the affected application. This can be done by modifying the code that uses the "HttpUtils#getURLConnection" method to explicitly enable hostname verification. Here is an example of how to enable hostname verification using the HttpsURLConnection class:
import javax.net.ssl.HttpsURLConnection;
// ... code snippet ...
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setHostnameVerifier((hostname, session) -> true);
// ... continue with the connection setup ...
Please note that this workaround should only be considered as a temporary solution until the application can be upgraded to a fixed version.
Conclusion
In conclusion, the vulnerability (CVE-2020-13955) in Apache Calcite exposes applications to potential man-in-the-middle attacks and information leakage. It is crucial to upgrade to Apache Calcite version 1.26.0 or later to mitigate this vulnerability. If immediate upgrade is not possible, applying the provided workaround can help protect the application temporarily. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.apache.calcite:calcite-core →
FAQ
Apache Calcite is a dynamic data management framework that provides a SQL interface for building and executing relational algebra queries. It is widely used in various applications and supports integration with different data sources.
The vulnerability in Apache Calcite could lead to information leakage and potential man-in-the-middle attacks. An attacker could intercept and manipulate the communication between the client and the server, potentially leading to unauthorized access or data leakage.
Versions of Apache Calcite prior to 1.26.0 are affected by this vulnerability.
To fix this vulnerability, it is recommended to upgrade to Apache Calcite version 1.26.0 or later. This can be done by updating the dependency in the project's Maven configuration file (pom.xml) to use the latest version of "org.apache.calcite:calcite-core".
Yes, a temporary workaround is to manually enable hostname verification for HTTPS connections in the affected application. This can be done by modifying the code that uses the "HttpUtils#getURLConnection" method to explicitly enable hostname verification.
Related vulnerabilities
Recent vulnerabilities recorded for org.apache.calcite:calcite-core.