Improper Control of Generation of Code ('Code Injection') Affecting org.apache.hive:hive-jdbc package, versions [4.0.0-alpha-1,4.0.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Control of Generation of Code ('Code Injection') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGAPACHEHIVE-6808764
  • published5 May 2024
  • disclosed3 May 2024
  • creditKostya Kortchinsky

Introduced: 3 May 2024

CVE-2023-35701  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade org.apache.hive:hive-jdbc to version 4.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') in the JDBC driver component due to improper URL validation. An attacker can exploit this vulnerability on a machine/endpoint where the JDBC driver (client) is running by setting up a malicious HTTP server and specifying a JDBC URL pointing towards this server. When a JDBC connection is attempted, the malicious HTTP server can provide a special response with a customized payload that triggers the execution of certain commands in the JDBC client.

Note

Exploiting this vulnerability is only possible if the malicious user has sufficient permissions to specify/edit JDBC URLs in an endpoint relying on the Hive JDBC driver and the JDBC client process runs under a privileged user.

CVSS Scores

version 3.1