Skip to main content
EPSS 0.9%top 42%

CVE-2026-49845: CWE-94 Improper Control of Generation of Code ('Code Injection') in Apache Software Foundation Apache Hive

0
Critical
Published: 08/25/2026 (08/25/2026, 10:13:49 UTC)
Source: GCVE Database
Vendor/Project: Apache Software Foundation
Product: Apache Hive

Description

CVE-2026-49845 is a critical code injection vulnerability in Apache Hive versions 4.0.0 and 4.0.0 that allows authenticated users with access to Hive Metastore APIs to manipulate partition metadata via crafted partition names. The flaw arises from direct SQL queries constructed with client-supplied partition names without proper parameterization, enabling SQL injection when direct SQL is enabled (default setting). This can lead to unauthorized reading, modification, or affecting of partition metadata such as statistics, truncation targets, and file-metadata cache operations. The issue is fixed in Apache Hive version 4.2.1.

CVSS v3.1

Score 9.8critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

Affected versions
=4.0.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 05:21:18 UTC

Technical Analysis

This vulnerability involves SQL injection in the Hive Metastore's direct SQL partition-name resolution mechanism. Several Hive Metastore RPCs use direct SQL helpers that embed client-supplied partition names into SQL queries using string concatenation rather than bind parameters. If a partition name contains crafted SQL (e.g., a single quote), it can alter the WHERE clause to match unintended rows, affecting reads, updates, truncations, and cache operations on partitions. The attack requires authenticated or network-trusted access to Hive Metastore partition-name APIs and only impacts partitions within tables the attacker can reference. The default configuration enables direct SQL, making this vulnerability exploitable unless mitigated. The issue is resolved in version 4.2.1.

Potential Impact

An attacker with authenticated access to Hive Metastore APIs can exploit this vulnerability to read or modify unintended partition metadata, including statistics updates, truncation targets, and file-metadata cache operations. This can lead to unauthorized data access and modification within the scope of partitions in tables accessible to the attacker. The vulnerability does not allow arbitrary cross-database access by itself but can disrupt partition-level operations, potentially impacting data integrity and availability.

Mitigation Recommendations

Users should upgrade Apache Hive to version 4.2.1 or later, where this vulnerability is fixed. Since the issue arises when direct SQL is enabled (which is the default), disabling direct SQL (setting metastore.try.direct.sql to false) can serve as a temporary mitigation if upgrading is not immediately possible. No other vendor advisories indicate additional mitigations or that the issue is already mitigated.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-5555-2x3r-gmgx
Osv Schema Version
1.4.0
Aliases
["CVE-2026-49845"]
State
PUBLISHED

Threat ID: 6a8d9ac3acd9273b493e0fb7

Added to database: 08/25/2026, 13:38:11 UTC

Last enriched: 09/29/2026, 05:21:18 UTC

Last updated: 10/09/2026, 18:48:20 UTC

Views: 54

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses