CVE-2023-35701

6.6 MEDIUM

📋 TL;DR

This CVE describes a code injection vulnerability in Apache Hive's JDBC driver that allows arbitrary code execution on client systems. Attackers can exploit it by tricking users into connecting to malicious HTTP servers via manipulated JDBC URLs. It affects Hive users running JDBC clients with vulnerable driver versions.

💻 Affected Systems

Products:
  • Apache Hive
Versions: 4.0.0-alpha-1 through versions before 4.0.0
Operating Systems: All operating systems running Hive JDBC driver
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects the JDBC driver component, not the Hive server itself. Requires client-side exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with privileged code execution on the JDBC client machine, potentially leading to data theft, lateral movement, or ransomware deployment.

🟠

Likely Case

Limited code execution within the JDBC client process context, potentially allowing data exfiltration or further privilege escalation.

🟢

If Mitigated

No impact if proper URL validation and least privilege principles are followed, or if patched version is used.

🌐 Internet-Facing: MEDIUM - Requires user interaction (connecting to malicious server) but no authentication needed for the initial connection attempt.
🏢 Internal Only: MEDIUM - Internal attackers with ability to manipulate JDBC URLs could exploit this, but requires privileged client process for full impact.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires setting up a malicious HTTP server and convincing users to connect via manipulated JDBC URLs. The client process must run with sufficient privileges for full impact.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.0.0

Vendor Advisory: https://lists.apache.org/thread/7zcv6l63spl4r66xwz5jv9rtrg2opx81

Restart Required: Yes

Instructions:

1. Download Apache Hive 4.0.0 or later from official Apache repositories. 2. Replace the vulnerable JDBC driver JAR files with the patched versions. 3. Restart all applications using the Hive JDBC driver. 4. Update any build dependencies to reference the new version.

🔧 Temporary Workarounds

Restrict JDBC URL Sources

all

Only allow JDBC connections to trusted, pre-approved servers and prevent users from specifying arbitrary JDBC URLs.

Run JDBC Clients with Least Privilege

all

Ensure Hive JDBC client processes run with minimal system privileges to limit potential damage from exploitation.

🧯 If You Can't Patch

  • Implement strict network controls to prevent JDBC connections to untrusted servers
  • Use application allowlisting to prevent execution of unauthorized code on client systems

🔍 How to Verify

Check if Vulnerable:

Check the Hive JDBC driver version in use. If using version 4.0.0-alpha-1 through any version before 4.0.0, the system is vulnerable.

Check Version:

java -cp hive-jdbc-*.jar org.apache.hive.jdbc.HiveDriver --version (if supported) or check JAR manifest: jar tf hive-jdbc-*.jar | grep META-INF/MANIFEST.MF && jar xf hive-jdbc-*.jar META-INF/MANIFEST.MF && cat META-INF/MANIFEST.MF

Verify Fix Applied:

Verify that Hive JDBC driver version is 4.0.0 or later by checking the JAR file metadata or version properties.

📡 Detection & Monitoring

Log Indicators:

  • Unusual JDBC connection attempts to unknown IP addresses
  • Error logs showing failed JDBC connections with unusual error patterns
  • Process execution logs showing unexpected commands from JDBC client processes

Network Indicators:

  • JDBC connections to non-standard ports or unfamiliar domains
  • HTTP traffic from JDBC clients to suspicious servers

SIEM Query:

source="*hive*" AND (url="*jdbc:hive2://*" OR process="*java*" AND cmdline="*hive*jdbc*") AND dest_ip NOT IN [trusted_server_list]

🔗 References

📤 Share & Export