Vulnerabilities in pkg:maven/org.apache.hive/hive-common

PACKAGE
Advisory Identifier: GHSA-932v-x9x2-vq29
Advisory Summary

CVE-2025-62728 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Hive common libraries in the Maven ecosystem. The issue involves hive metastore server is vulnerable to sql injection. Remediation is available by upgrading affected packages to version 4.2.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.hive/hive-common

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.hive/hive-common. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-932v-x9x2-vq29 CVE-2025-62728 HIGH Hive Metastore Server is vulnerable to SQL Injection

CVE-2025-62728 at a Glance

CVE Identifier CVE-2025-62728
GHSA Identifier GHSA-932v-x9x2-vq29
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Hive common
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2025-62728

To remediate this vulnerability, upgrade all affected Hive common dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.hive:hive-common fixed: 4.2.0
<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-common</artifactId>
    <version>4.2.0</version>
</dependency>
org.apache.hive:hive-metastore fixed: 4.2.0
<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-metastore</artifactId>
    <version>4.2.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.hive

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-62728, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.hive

Analyze the terminal output to locate any version of Hive common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.hive 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Hive common, 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

SQL injection vulnerability in Hive Metastore Server (HMS) when processing delete column statistics requests via the Thrift APIs. The vulnerability is only exploitable by trusted/authorized users/applications that are allowed to call directly the Thrift APIs. In most real-world deployments, HMS is accessible to only a handful of applications (e.g., Hiveserver2) thus the vulnerability is not exploitable. Moreover, the vulnerable code cannot be reached when metastore.try.direct.sql property is set to false. This issue affects Apache Hive: from 4.1.0 before 4.2.0. Users are recommended to upgrade to version 4.2.0, which fixes the issue. Users who cannot upgrade directly are encouraged to set metastore.try.direct.sql property to false if the HMS Thrift APIs are exposed to general public.

CVE-2025-62728 Affected Hive common Versions

2 component(s)
Fixed Versions:
4.2.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.hive:hive-common
Maven
≥ 4.1.0
< 4.2.0
4.2.0
org.apache.hive:hive-metastore
Maven
≥ 4.1.0
< 4.2.0
4.2.0

References

Frequently Asked Questions

What is CVE-2025-62728?
CVE-2025-62728 is a security vulnerability in Hive common involving Hive Metastore Server is vulnerable to SQL Injection under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Hive common versions are affected?
Affected versions include releases prior to 4.2.0 across affected packages: org.apache.hive:hive-common, org.apache.hive:hive-metastore.
What version fixes CVE-2025-62728?
Upgrading to 4.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hive-common affected?
Yes, org.apache.hive:hive-common is affected in releases prior to 4.2.0. Upgrade your dependency to 4.2.0 or later.
Is hive-metastore affected?
Yes, org.apache.hive:hive-metastore is affected in releases prior to 4.2.0. Upgrade your dependency to 4.2.0 or later.
What CWE is associated with CVE-2025-62728?
CVE-2025-62728 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Maven dependencies for CVE-2025-62728?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.hive'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-932v-x9x2-vq29",
  "modified" : "2025-12-01T19:05:04Z",
  "published" : "2025-11-26T09:31:22Z",
  "aliases" : [ "CVE-2025-62728" ],
  "summary" : "Hive Metastore Server is vulnerable to SQL Injection",
  "details" : "SQL injection vulnerability in Hive Metastore Server (HMS) when processing delete column statistics requests via the Thrift APIs. The vulnerability is only exploitable by trusted/authorized users/applications that are allowed to call directly the Thrift APIs. In most real-world deployments, HMS is accessible to only a handful of applications (e.g., Hiveserver2) thus the vulnerability is not exploitable. Moreover, the vulnerable code cannot be reached when metastore.try.direct.sql property is set to false.\n\nThis issue affects Apache Hive: from 4.1.0 before 4.2.0.\n\nUsers are recommended to upgrade to version 4.2.0, which fixes the issue. Users who cannot upgrade directly are encouraged to set metastore.try.direct.sql property to false if the HMS Thrift APIs are exposed to general public.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.hive:hive-common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.hive:hive-metastore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62728"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/hive/commit/c18d0df2702130cf5d0f050e516eb8999aa56301"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/hive"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/HIVE-29269"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/yj65dd8dmzgy8p3nv8zy33v8knzg9o7g"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/11/26/3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-01T19:05:04Z",
    "nvd_published_at" : "2025-11-26T09:15:46Z"
  }
}