CVE-2018-1282: SQL Injection in hive-jdbc

org.apache.hive:hive-jdbc Updated 02 Oct 2025

Summary

21/11/2018
Yes i
Critical
9.1

CVE-2018-1282: SQL Injection in hive-jdbc. Affects org.apache.hive:hive-jdbc versions >= 0.7.1, < 2.3.3. Fixed in 2.3.3. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Apache Hive JDBC driver is a component of the Apache Hive project, which provides a data warehouse infrastructure built on top of Apache Hadoop. The JDBC driver allows applications to connect to Hive and execute SQL queries. It is commonly used in Java applications that interact with Hive databases. However, versions 0.7.1 to 2.3.2 of the driver are vulnerable to a SQL injection attack.

Vulnerability Detail

This vulnerability in the Apache Hive JDBC driver allows an attacker to bypass the argument escaping/cleanup that the driver performs in the PreparedStatement implementation. By carefully crafting SQL arguments, an attacker can inject malicious SQL code into the query, potentially leading to unauthorized access, data manipulation, or other malicious activities. The vulnerability has a CVSS score of 9.1, indicating a critical severity level.

How To Fix

Minimum fixed version

2.3.3

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 fixed version is not immediately feasible, a possible workaround is to manually sanitize and validate user input before constructing SQL queries. This involves properly escaping special characters and using parameterized queries to separate SQL code from user input. Here is an example of how to use a parameterized query with the Apache Hive JDBC driver in Java:

String sql = "SELECT * FROM table WHERE column = ?";
PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1, userInput);
ResultSet resultSet = statement.executeQuery();

By using parameterized queries, the driver will handle the necessary escaping and prevent SQL injection attacks.

Conclusion

The Apache Hive JDBC driver versions 0.7.1 to 2.3.2 are vulnerable to a critical SQL injection attack. To mitigate this vulnerability, it is recommended to upgrade to version 2.3.3 or later of the driver. If immediate upgrade is not possible, manually sanitize and validate user input before constructing SQL queries. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.hive:hive-jdbc →

Share this vulnerability

FAQ

This vulnerability allows an attacker to execute arbitrary SQL code in the context of the application using the Apache Hive JDBC driver. Depending on the privileges of the database user, this can lead to unauthorized access, data manipulation, or other malicious activities.

No, only versions 0.7.1 to 2.3.2 of the Apache Hive JDBC driver are vulnerable to this SQL injection attack. Version 2.3.3 and later include a fix for the vulnerability.

While there may not be a publicly available exploit specific to this vulnerability, SQL injection attacks are a well-known and common technique used by attackers. It is important to address this vulnerability promptly to prevent potential exploitation.

Yes, this vulnerability can be exploited remotely if the affected application exposes the Apache Hive JDBC driver to untrusted user input. It is recommended to apply the fix or workaround as soon as possible to mitigate the risk of remote exploitation.

Yes, this vulnerability has a CVSS score of 9.1, indicating a critical severity level. The CVSS score helps assess the potential impact and urgency of addressing the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.hive:hive-jdbc.

How To Fix

Minimum fixed version

2.3.3

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback