Vulnerabilities in pkg:maven/org.apache.ranger/ranger-hive-plugin
PACKAGECVE-2021-40331 is a HIGH (CVSS 8.1) apache ranger hive plugin missing vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Ranger hive plugin libraries in the Maven ecosystem. The issue involves apache ranger hive plugin missing permissions check. Remediation is available by upgrading affected packages to version 2.4.0.
pkg:maven/org.apache.ranger/ranger-hive-plugin
Vulnerability advisories affecting package pkg:maven/org.apache.ranger/ranger-hive-plugin. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vjr2-wpfh-5r9p | CVE-2021-40331 | HIGH | Apache Ranger Hive Plugin missing permissions check |
CVE-2021-40331 at a Glance
Security Impact
CVSS: 8.1
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:H/I:H/A:N).
How to Fix CVE-2021-40331
To remediate this vulnerability, upgrade all affected Ranger hive plugin 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.ranger</groupId>
<artifactId>ranger-hive-plugin</artifactId>
<version>2.4.0</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.ranger
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-40331, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.ranger
Analyze the terminal output to locate any version of Ranger hive plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.ranger 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-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In Ranger hive plugin, 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-2021-40331 Affected Ranger hive plugin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.ranger:ranger-hive-plugin
|
Maven |
≥ 2.0.0
< 2.4.0
|
2.4.0
|
References
Frequently Asked Questions
What is CVE-2021-40331?
Which Ranger hive plugin versions are affected?
What version fixes CVE-2021-40331?
Is ranger-hive-plugin affected?
What is the CVSS score of CVE-2021-40331?
What CWE is associated with CVE-2021-40331?
How can I check Maven dependencies for CVE-2021-40331?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vjr2-wpfh-5r9p",
"modified" : "2023-05-11T20:56:09Z",
"published" : "2023-05-05T09:30:15Z",
"aliases" : [ "CVE-2021-40331" ],
"summary" : "Apache Ranger Hive Plugin missing permissions check",
"details" : "An Incorrect Permission Assignment for Critical Resource vulnerability was found in the Apache Ranger Hive Plugin. Any user with SELECT privilege on a database can alter the ownership of the table in Hive when Apache Ranger Hive Plugin is enabled\nThis issue affects Apache Ranger Hive Plugin: from 2.0.0 through 2.3.0. Users are recommended to upgrade to version 2.4.0 or later.\n\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.ranger:ranger-hive-plugin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-40331"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/ranger/commit/7dec3015ec82b69ba8f724410f12dfce2480cccd"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/ranger/commit/9115a20d524ba9173ce5db3e270c385d58d8aeab"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/ranger"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/RANGER-3357"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/RANGER-3474"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/s68yls6cnkdmzn1k4hqt50vs6wjvt2rn"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-732" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-05-05T22:53:57Z",
"nvd_published_at" : "2023-05-05T08:15:08Z"
}
}