CVE-2018-1315 Incorrect Permission Assignment for Critical Resource in Apache hive

Low 3.7 Published Updated

A malicious FTP server can write files to arbitrary locations on the cluster via the HPL/SQL COPY FROM FTP command.

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

What is CVE-2018-1315?

CVE-2018-1315 is a low-severity path traversal vulnerability in Apache Hive, published on 5 Apr 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-732

Which versions are affected by CVE-2018-1315?

6 open source packages ship an affected version, including org.apache.hive:hive, org.apache.hive:hive-exec and org.apache.hive:hive-service. It affects 1 product.

PackageAffectedFixed in
org.apache.hive:hive MavenFrom 2.1.02.3.3
org.apache.hive:hive MavenFrom 2.1.02.3.3
org.apache.hive:hive-exec MavenFrom 2.1.02.3.3
org.apache.hive:hive-exec MavenFrom 2.1.02.3.3
org.apache.hive:hive-service MavenFrom 2.1.02.3.3
org.apache.hive:hive-service MavenFrom 2.1.02.3.3

Products include Apache Hive.

How do I fix CVE-2018-1315?

Upgrade org.apache.hive:hive to 2.3.3 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2018-1315 being exploited?

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

Sources

Also known as GHSA-p639-xxv5-j383.

Is CVE-2018-1315 in your software?

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

Check your SBOMs for free