CVE-2023-35701: Hive jdbc Apache Hive Code Injection Vulnerability Vulnerability
MODERATECVE-2023-35701 is a MODERATE (CVSS 6.6) apache hive code injection vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Hive jdbc libraries in the Maven ecosystem. The issue involves apache hive code injection vulnerability. Remediation is available by upgrading affected packages to version 4.0.0.
CVE-2023-35701 at a Glance
Security Impact
CVSS: 6.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-35701
To remediate this vulnerability, upgrade all affected Hive jdbc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>4.0.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.hive
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-35701, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.hive
Analyze the terminal output to locate any version of Hive jdbc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.hive command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Hive jdbc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-35701 Affected Hive jdbc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.hive:hive-jdbc
|
Maven |
≥ 4.0.0-alpha-1
< 4.0.0
|
4.0.0
|
References
Frequently Asked Questions
What is CVE-2023-35701?
Which Hive jdbc versions are affected?
What version fixes CVE-2023-35701?
Is hive-jdbc affected?
What is the CVSS score of CVE-2023-35701?
What CWE is associated with CVE-2023-35701?
How can I check Maven dependencies for CVE-2023-35701?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vpw3-3prf-3974",
"modified" : "2025-02-13T19:00:01Z",
"published" : "2024-05-03T09:30:52Z",
"aliases" : [ "CVE-2023-35701" ],
"summary" : "Apache Hive Code Injection vulnerability",
"details" : "Improper Control of Generation of Code ('Code Injection') vulnerability in Apache Hive.\n\nThe vulnerability affects the Hive JDBC driver component and it can potentially lead to arbitrary code execution on the machine/endpoint that the JDBC driver (client) is running. The malicious user must have sufficient permissions to specify/edit JDBC URL(s) in an endpoint relying on the Hive JDBC driver and the JDBC client process must run under a privileged user to fully exploit the vulnerability. \n\nThe attacker can setup a malicious HTTP server and specify a JDBC URL pointing towards this server. When a JDBC connection is attempted, the malicious HTTP server can provide a special response with customized payload that can trigger the execution of certain commands in the JDBC client.This issue affects Apache Hive: from 4.0.0-alpha-1 before 4.0.0.\n\nUsers are recommended to upgrade to version 4.0.0, which fixes the issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hive:hive-jdbc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-alpha-1"
}, {
"fixed" : "4.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35701"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hive/commit/7abeb1df463cc389f668172e7cf3bb772799858a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/hive"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/HIVE-27554"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/7zcv6l63spl4r66xwz5jv9rtrg2opx81"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/05/03/3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-03T20:27:25Z",
"nvd_published_at" : "2024-05-03T09:15:07Z"
}
}