CVE-2023-35701 Apache Hive: Arbitrary command execution via JDBC driver

Medium 6.6 Published Updated

Attacker with JDBC URL edit permissions can execute arbitrary code on the client machine via a malicious HTTP server response.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-35701?

CVE-2023-35701 is a medium-severity code injection vulnerability in Apache Hive, published on 3 May 2024. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Improper Control of Generation of Code ('Code Injection') vulnerability in Apache Hive.

The 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. 

The 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.

Users are recommended to upgrade to version 4.0.0, which fixes the issue.

Weakness: CWE-94

Which versions are affected by CVE-2023-35701?

2 open source packages ship an affected version, including org.apache.hive:hive-jdbc. It affects 1 product.

PackageAffectedFixed in
org.apache.hive:hive-jdbc MavenFrom 4.0.0-alpha-14.0.0
org.apache.hive:hive-jdbc MavenFrom 4.0.0-alpha-14.0.0

Products include Apache Hive.

How do I fix CVE-2023-35701?

Upgrade org.apache.hive:hive-jdbc to 4.0.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2023-35701 being exploited?

There is no known exploitation of CVE-2023-35701 in the wild and no public exploit code.

Sources

Also known as GHSA-vpw3-3prf-3974.

Is CVE-2023-35701 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free