Hive Metastore Server is vulnerable to SQL Injection
High severity
GitHub Reviewed
Published
Nov 26, 2025
to the GitHub Advisory Database
•
Updated Dec 1, 2025
Description
Published by the National Vulnerability Database
Nov 26, 2025
Published to the GitHub Advisory Database
Nov 26, 2025
Reviewed
Dec 1, 2025
Last updated
Dec 1, 2025
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.
References