VYPR
Low severityNVD Advisory· Published Apr 5, 2018· Updated Sep 17, 2024

CVE-2018-1315

CVE-2018-1315

Description

In Apache Hive 2.1.0 to 2.3.2, when 'COPY FROM FTP' statement is run using HPL/SQL extension to Hive, a compromised/malicious FTP server can cause the file to be written to an arbitrary location on the cluster where the command is run from. This is because FTP client code in HPL/SQL does not verify the destination location of the downloaded file. This does not affect hive cli user and hiveserver2 user as hplsql is a separate command line script and needs to be invoked differently.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In Apache Hive 2.1.0–2.3.2, the HPL/SQL extension's FTP client writes downloaded files to arbitrary cluster locations when connecting to a malicious FTP server.

Vulnerability

In Apache Hive versions 2.1.0 to 2.3.2, the HPL/SQL extension's COPY FROM FTP statement does not validate the destination path of files downloaded from an FTP server. The FTP client code in HPL/SQL trusts the server-provided filename and writes it to the specified local directory without sanitization. This flaw is present only when HPL/SQL is invoked as a separate command-line script (hplsql); the standard Hive CLI and HiveServer2 are unaffected [1][2].

Exploitation

An attacker must operate a compromised or malicious FTP server that the HPL/SQL client connects to. When a user executes a COPY FROM FTP statement, the attacker-controlled FTP server can return a crafted filename containing path traversal characters (e.g., ../../) or an absolute path, causing the downloaded file to be written to an arbitrary location on the cluster filesystem. No additional authentication or user interaction beyond initiating the FTP transfer is required [1].

Impact

Successful exploitation allows an attacker to write arbitrary file content to any location writable by the HPL/SQL process on the cluster. This could lead to overwriting configuration files, planting cron jobs, or inserting malicious scripts, potentially resulting in privilege escalation or remote code execution on the Hive cluster [1][2].

Mitigation

Upgrade to Apache Hive 2.3.3 or later, which contains the fix that validates destination filenames during FTP transfers [2]. If upgrading is not immediately possible, avoid using the HPL/SQL extension with untrusted FTP servers. This issue is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog as of publication date.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.hive:hiveMaven
>= 2.1.0, < 2.3.32.3.3
org.apache.hive:hive-execMaven
>= 2.1.0, < 2.3.32.3.3
org.apache.hive:hive-serviceMaven
>= 2.1.0, < 2.3.32.3.3

Affected products

4

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.