VYPR
High severityNVD Advisory· Published Jul 16, 2022· Updated Aug 4, 2024

Apache Hive Security vulnerability in Hive with UDFs

CVE-2021-34538

Description

Apache Hive before 3.1.3 "CREATE" and "DROP" function operations does not check for necessary authorization of involved entities in the query. It was found that an unauthorized user can manipulate an existing UDF without having the privileges to do so. This allowed unauthorized or underprivileged users to drop and recreate UDFs pointing them to new jars that could be potentially malicious.

AI Insight

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

Apache Hive before 3.1.3 lacks authorization checks on CREATE/DROP FUNCTION, allowing unauthorized users to manipulate UDFs with potentially malicious jars.

Root

Cause

CVE-2021-34538 is an authorization bypass vulnerability in Apache Hive, affecting versions prior to 3.1.3. The core issue lies in the CREATE FUNCTION and DROP FUNCTION operations, which fail to verify that the user executing the command has the necessary privileges on the involved entities. This means that the authorization checks are either missing or improperly implemented for these specific operations [1].

Exploitation

An attacker can exploit this flaw by simply having access to a Hive query interface, even without elevated privileges. By issuing DROP and CREATE commands against an existing user-defined function (UDF), the attacker can replace that UDF with a reference to a new, potentially malicious Java archive (JAR). No authentication bypass or additional privileges are required beyond the ability to submit Hive queries [1].

Impact

Successful exploitation allows an unauthorized or underprivileged user to alter the behavior of a UDF. When the UDF is subsequently called by other users (including privileged ones), the malicious code within the attacker-supplied JAR is executed within the Hive runtime context. This could lead to arbitrary code execution, data exfiltration, or further compromise of the Hive metastore and underlying Hadoop cluster [1].

Mitigation

The vulnerability is fixed in Apache Hive version 3.1.3. Users running earlier versions should upgrade to this release or later. As of the CVE publication date, no workarounds have been documented, and the vulnerability has not been listed in CISA’s Known Exploited Vulnerabilities (KEV) catalog. The official Hive repository and release notes [2] provide details on obtaining the patched version.

AI Insight generated on May 21, 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
< 3.1.33.1.3

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

0

No linked articles in our index yet.