{"answers":{"affected":"2 open source packages ship an affected version, including org.apache.ranger:ranger-hive-plugin. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-40331 in the wild and no public exploit code.","fix":"Upgrade org.apache.ranger:ranger-hive-plugin to 2.4.0 or later.","what":"CVE-2021-40331 is a high-severity missing authorization vulnerability in Apache Ranger Hive Plugin, published on 5 May 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-40331 and fix it if it is affected.\n\nWhat it is: CVE-2021-40331 is a high-severity missing authorization vulnerability in Apache Ranger Hive Plugin, published on 5 May 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-40331 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.apache.ranger:ranger-hive-plugin (Maven): affected from 2.0.0; fixed in 2.4.0\n- org.apache.ranger:ranger-hive-plugin (Maven): affected from 2.0.0; fixed in 2.4.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-40331/ (Markdown: https://insights.sbomify.com/CVE-2021-40331/index.md)","id":"CVE-2021-40331","markdown":"https://insights.sbomify.com/CVE-2021-40331/index.md","name":"CVE-2021-40331","record":{"aliases":["GHSA-vjr2-wpfh-5r9p"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Apache Ranger Hive Plugin","requires_auth":"low_privilege","summary":"Users with SELECT privileges can improperly alter table ownership in Hive when the Apache Ranger Hive Plugin is enabled.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"ranger","vendor":"apache"}],"cvss":{"score":8.1,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-732","name":"Incorrect Permission Assignment for Critical Resource"}],"description":"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Permissions problem in the Apache Ranger Hive Plugin","id":"CVE-2021-40331","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"missing_authorization","year":"2021"},"n_packages":2,"n_references":1,"next":{"headline":"Weak default credential associated with TCP port 26","id":"CVE-2021-40333"},"packages":[{"ecosystem":"Maven","fixed":["2.4.0"],"introduced":["2.0.0"],"last_affected":[],"package":"org.apache.ranger:ranger-hive-plugin","purl":null,"source":"GHSA-vjr2-wpfh-5r9p"},{"ecosystem":"Maven","fixed":["2.4.0"],"introduced":["2.0.0"],"last_affected":[],"package":"org.apache.ranger:ranger-hive-plugin","purl":"pkg:maven/org.apache.ranger/ranger-hive-plugin","source":"GHSA-vjr2-wpfh-5r9p"}],"prev":{"headline":"Other in n/a","id":"CVE-2021-40330"},"products":["Apache Ranger Hive Plugin"],"published":"2023-05-05","related":[{"cvss_score":9.8,"headline":"Apache Ranger: OS Command Injection via Username in UnixUserGroupBuilder","id":"CVE-2026-28672","kev_date_added":null,"published":"2026-08-10"},{"cvss_score":9.8,"headline":"Apache Ranger: SQL Injection vulnerability in lookup functionality","id":"CVE-2026-32227","kev_date_added":null,"published":"2026-08-10"},{"cvss_score":9.8,"headline":"Apache Ranger: Privilege Escalation via URL Parameter","id":"CVE-2026-40920","kev_date_added":null,"published":"2026-08-10"},{"cvss_score":9.8,"headline":"Apache Ranger: Remote Code Execution via JDBC URL Injection","id":"CVE-2026-42537","kev_date_added":null,"published":"2026-08-10"},{"cvss_score":9.8,"headline":"Apache Ranger: Remote Code Execution via Arbitrary Class Instantiation","id":"CVE-2026-44416","kev_date_added":null,"published":"2026-08-10"},{"cvss_score":9.8,"headline":"Apache Ranger: Remote Code Execution Vulnerability in GraalScriptEngineCreator","id":"CVE-2026-55799","kev_date_added":null,"published":"2026-08-10"},{"cvss_score":9.8,"headline":"Apache Ranger: Remote Code Execution Vulnerability in NashornScriptEngineCreator","id":"CVE-2025-59059","kev_date_added":null,"published":"2026-03-03"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-10-11","vendors":["Apache Software Foundation"]},"summary":"Users with SELECT privileges can improperly alter table ownership in Hive when the Apache Ranger Hive Plugin is enabled.","url":"https://insights.sbomify.com/CVE-2021-40331/"}