CVE-2022-41137: Apache Hive Deserialization Of Untrusted Data When Vulnerability
HIGHCVE-2022-41137 is a HIGH (CVSS 8.3) deserialization of untrusted data when vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Apache Hive libraries in the Maven ecosystem. The issue involves deserialization of untrusted data when fetching partitions from the metastore. Remediation is available by upgrading affected packages to version 4.0.0-alpha-2.
CVE-2022-41137 at a Glance
Security Impact
CVSS: 8.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H).
How to Fix CVE-2022-41137
To remediate this vulnerability, upgrade all affected Apache Hive dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>4.0.0-alpha-2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.hive
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-41137, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.hive
Analyze the terminal output to locate any version of Apache Hive in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0-alpha-2), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.hive command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Apache Hive, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-41137 Affected Apache Hive Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.hive:hive-exec
|
Maven |
≥ 4.0.0-alpha-1
< 4.0.0-alpha-2
All 1 versions
4.0.0-alpha-1
|
4.0.0-alpha-2
|
References
Frequently Asked Questions
What is CVE-2022-41137?
Which Apache Hive versions are affected?
What version fixes CVE-2022-41137?
Is hive-exec affected?
What is the CVSS score of CVE-2022-41137?
What CWE is associated with CVE-2022-41137?
How can I check Maven dependencies for CVE-2022-41137?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6hqr-c69m-r76q",
"modified" : "2024-12-05T19:57:26Z",
"published" : "2024-12-05T12:31:28Z",
"aliases" : [ "CVE-2022-41137" ],
"summary" : "Apache Hive: Deserialization of untrusted data when fetching partitions from the Metastore",
"details" : "Apache Hive Metastore (HMS) uses SerializationUtilities#deserializeObjectWithTypeInformation method when filtering and fetching partitions that is unsafe and can lead to Remote Code Execution (RCE) since it allows the deserialization of arbitrary data.\n\nIn real deployments, the vulnerability can be exploited only by authenticated users/clients that were able to successfully establish a connection to the Metastore. From an API perspective any code that calls the unsafe method may be vulnerable unless it performs additional prerechecks on the input arguments.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.hive:hive-exec"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-alpha-1"
}, {
"fixed" : "4.0.0-alpha-2"
} ]
} ],
"versions" : [ "4.0.0-alpha-1" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41137"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hive/commit/60027bb9c91a93affcfebd9068f064bc1f2a74c9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/hive"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/HIVE-26539"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/jwtr3d9yovf2wo0qlxvkhoxnwxxyzgts"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/12/04/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-05T19:57:26Z",
"nvd_published_at" : "2024-12-05T10:15:04Z"
}
}