Skip to main content

Apache Hive CVE-2026-49845

| EUVDEUVD-2026-65396 CRITICAL
Code Injection (CWE-94)
2026-08-25 apache GHSA-5555-2x3r-gmgx
9.8
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate/reach Metastore RPC endpoint
  2. Delivery
    Craft partition name with single-quote SQL
  3. Exploit
    Invoke partition-name API on target table
  4. Execution
    Injected clause matches extra partitions
  5. Impact
    Corrupt or truncate unintended partition metadata

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires (1) the ability to invoke Hive Metastore partition-name RPCs (e.g., getPartitionsByNames, partition column-statistics updates, truncate/drop, file-metadata cache operations) against a target table the caller can reference - the vendor states this needs an authenticated or network-trusted caller, so it is not truly unauthenticated despite the PR:N in the supplied CVSS vector; (2) metastore.try.direct.sql enabled, which is the default (metastore.try.direct.sql=true); and (3) a crafted PART_NAME containing a single quote and injected SQL passed through the direct-SQL helpers (DirectSqlUpdatePart.quoteString / MetaStoreDirectSql.getPartitionsByNames). Limiting factors: impact is scoped to partitions within tables the caller can already reference (no arbitrary cross-database access via this bug alone), exploitation is blocked if direct SQL is disabled, and it requires reachability of the Metastore API plus whatever authentication/network trust the deployment enforces.

Impact

The signals conflict and must be reconciled before prioritization. The supplied CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N with C:H/I:H/A:H (9.8), implying unauthenticated network exploitation with total impact - but the vendor description explicitly requires an 'authenticated or network-trusted caller' with access to Hive Metastore partition APIs, which contradicts PR:N. Treating the auth requirement as authenticated/trusted-network access (PR:L) materially lowers real-world risk versus the 9.8 headline. Impact is also narrower than C:H/I:H/A:H suggests: the vendor states the effect is confined to targeting the wrong partitions within tables the caller can already reference, not arbitrary cross-database reads or code execution. No EPSS score was provided, the flaw is not in CISA KEV, and no POC is referenced, so there is no evidence of active or automated exploitation. Realistically this is a genuine data-integrity/availability issue for multi-tenant Metastore deployments (wrong-partition truncate/drop/stats corruption) but a lower operational priority than a true unauthenticated RCE; exposing a Metastore endpoint to untrusted callers with the default direct SQL enabled is the main aggravating factor.

Exploit ScenarioDerived

An authenticated analyst or service account that can call Hive Metastore partition APIs against a table it references submits a partition name containing a single quote plus crafted SQL, altering the WHERE clause of a direct-SQL partition lookup. The malformed lookup matches additional partitions, so an intended single-partition stats update, truncate, or drop instead affects or destroys metadata for unintended partitions in that table. No public POC is referenced, and exploitation requires reaching the Metastore RPC interface with direct SQL enabled (default).

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Aug 25, 2026

SQL injection in the Apache Hive Metastore (versions 4.0.0 through 4.2.0) lets a caller who can invoke partition-name Metastore RPCs manipulate the generated WHERE clause so operations intended for one partition match additional rows in the same table. Because client-supplied partition names are concatenated into direct-SQL statements instead of bound as parameters, a crafted name containing a single quote can redirect reads, statistics updates, truncate/drop targets, and file-metadata cache operations to unintended partitions. No public exploit is identified at time of analysis and the flaw is not in CISA KEV; the input assigns CVSS 9.8, but the vendor description constrains impact to partition targeting within referenceable tables rather than arbitrary cross-database access.

Earlier versions of this analysis (1)
v1 Aug 25, 2026 - 10:51

SQL injection in the Hive Metastore direct-SQL partition-name resolution paths lets authenticated callers with access to Hive Metastore RPC APIs manipulate partition-targeting logic in Apache Hive before 4.2.1. By supplying a partition name containing a single quote and crafted SQL, an attacker can widen the generated WHERE clause so operations intended for one partition match additional rows, corrupting reads, statistics updates, truncation, drop, and file-metadata-cache targets within tables they can reference. The flaw is exposed by default because it triggers whenever metastore.try.direct.sql is enabled (default true); no public exploit is identified at time of analysis and it is not listed in CISA KEV.

RemediationAI

Vendor-released patch: 4.2.1 - upgrade the Hive Metastore server to 4.2.1, which replaces the vulnerable string-concatenated partition-name queries with bound parameters (fix commit https://github.com/apache/hive/commit/ca64f08a8e43db9845b47d5fa2e96f7fdea7288e; advisory https://lists.apache.org/thread/6d56mk501fp4f8cb5wvrpj2jwd9knt05). If immediate patching is not possible, restrict Metastore Thrift API access to trusted hosts/services via network ACLs or firewall the metastore port (default 9083) so untrusted clients cannot invoke partition RPCs, and enable Metastore authentication/authorization (Kerberos/SASL plus storage-based or Apache Ranger authorization) to limit which principals can reach partition-name APIs. Setting metastore.try.direct.sql=false forces the ORM path and avoids the vulnerable helpers, but carries a significant performance penalty for partition-heavy workloads and should be treated as a last-resort stopgap. Do not rely on input validation of partition names alone; the durable fix is the 4.2.1 upgrade.

Affected VersionsENISA

Apache Hive 4.0.0 ≤4.2.0

Affected Packages

euvd apache_hive no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The Hive Metastore is the metadata catalog for Apache Hive (and frequently shared by Spark, Trino/Presto, and Impala), storing table, partition, and statistics records in a backing RDBMS. When metastore.try.direct.sql is enabled (the default), several RPCs resolve partitions by full partition name (PART_NAME) through direct-SQL helper paths rather than the DataNucleus ORM. The fix commit (ca64f08) shows the root cause: DirectSqlUpdatePart.quoteString() wrapped raw input as "'" + input + "'" and joined those values into an IN clause, and MetaStoreDirectSql.getPartitionsByNames() did the same. The patch replaces the concatenation with JDBC PreparedStatement bind parameters (makeParams()/setString), the correct defense for this class. Although the tags cite CWE-94 (code injection) and 'RCE', the mechanism and diff are textbook SQL injection (better modeled as CWE-89) in metastore direct-SQL query construction, not remote code execution.

Know when Apache Hive gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (apache) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.3 HIGH

Vendor requires an authenticated/trusted Metastore caller so PR:L not PR:N; low-complexity injection; confidentiality limited to partition metadata (C:L) while wrong-partition truncate/drop drives I:H/A:H.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
CVSS changed
Aug 25, 2026 - 20:22 NVD
9.8 (CRITICAL)
CVE Published
Aug 25, 2026 - 10:13 cve.org
CRITICAL

DescriptionCVE.org

SQL injection in Hive Metastore direct SQL partition-name resolution in Apache Hive before 4.2.1 on all platforms allows authenticated users with access to Hive Metastore APIs to read, modify, or affect unintended partition metadata (including statistics updates, truncation targets, and file-metadata cache operations) via crafted partition names in metastore RPC requests when direct SQL is enabled (the default). Users are recommended to upgrade to version 4.2.1, which fixes this issue.

Details about the issue: Several Hive Metastore RPCs resolve partitions by full partition name (PART_NAME) through direct-SQL helpers. In those paths, client-supplied partition names are embedded into SQL using string concatenation (DirectSqlUpdatePart.quoteString() → '...') instead of bind parameters. A partition name containing a single quote (and crafted SQL) can alter the generated WHERE clause so that lookups intended for one partition match additional rows. That can affect reads, stats updates, truncate targets, metadata-cache targets, and related operations when metastore.try.direct.sql is enabled (default: true). An authenticated or network-trusted caller with the ability to invoke Hive Metastore partition-name APIs against a target table (directly or via Hive/other clients), when direct SQL is enabled can perform this attack. Also, the impact is mainly within table & partition targeting (read/update/truncate/drop/cache the wrong partitions in a table they can reference), not arbitrary cross-database access via this bug alone.

Executive ViewAI

Why It Matters

Apache Hive Metastore versions 4.0.0 through 4.2.0 contain a SQL injection vulnerability allowing Metastore-connected services to manipulate partition-level data access and operations, creating immediate risk to data integrity and confidentiality in analytics environments. Organizations using affected versions face potential unauthorized reads, modifications, and deletions of data across accessible partitions-a significant exposure in data lakes that support critical business intelligence and decision-making.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
widely deployed metadata catalog across Hadoop/Spark/Trino data platforms
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy