# CVE-2021-40331: Permissions problem in the Apache Ranger Hive Plugin

- Priority: **Routine**
- Reason: Not severe (CVSS 8.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-05-05 · Modified: 2024-10-11
- Aliases: GHSA-vjr2-wpfh-5r9p
- Record: https://cvemate.com/vulnerability/CVE-2021-40331 · JSON: https://cvemate.com/vulnerability/CVE-2021-40331/json

## Description

```text
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
This 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.
```

## Signals

- CVSS: 8.1 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- EPSS: 0.918%, percentile 61.444%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- apache software foundation apache ranger hive plugin: ≥ 2.0.0, ≤ 2.3.0
- apache ranger: ≥ 2.0.0, ≤ 2.3.0
- org.apache.ranger ranger-hive-plugin (Maven): ≥ 2.0.0, \< 2.4.0

## References

- <https://lists.apache.org/thread/s68yls6cnkdmzn1k4hqt50vs6wjvt2rn>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-40331>
- <https://github.com/apache/ranger/commit/7dec3015ec82b69ba8f724410f12dfce2480cccd>
- <https://github.com/apache/ranger/commit/9115a20d524ba9173ce5db3e270c385d58d8aeab>
- <https://github.com/apache/ranger>
- <https://issues.apache.org/jira/browse/RANGER-3357>
- <https://issues.apache.org/jira/browse/RANGER-3474>

---

Data as of 2026-12-05T03:34:52.366Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
