CVE-2026-49845
Full vulnerability record from the local CVENow database.
Description
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.
View original CVE JSON
{
"id": "CVE-2026-49845",
"sourceIdentifier": "[email protected]",
"published": "2026-08-25T11:16:53.410",
"lastModified": "2026-11-03T23:17:45.880",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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.\n\nDetails about the issue:\nSeveral 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."
},
{
"lang": "es",
"value": "La inyección SQL en la resolución de nombres de partición SQL directa de Hive Metastore en Apache Hive anterior a 4.2.1 en todas las plataformas permite a usuarios autenticados con acceso a las API de Hive Metastore leer, modificar o afectar metadatos de partición no deseados (incluyendo actualizaciones de estadísticas, objetivos de truncamiento y operaciones de caché de metadatos de archivos) a través de nombres de partición manipulados en solicitudes RPC de metastore cuando el SQL directo está habilitado (el valor predeterminado). Se recomienda a los usuarios actualizar a la versión 4.2.1, que corrige este problema.\n\nDetalles sobre el problema:\nVarias RPC de Hive Metastore resuelven particiones por nombre de partición completo (PART_NAME) a través de ayudantes de SQL directo. En esas rutas, los nombres de partición proporcionados por el cliente se incrustan en SQL usando concatenación de cadenas (DirectSqlUpdatePart.quoteString() ? '...') en lugar de parámetros de enlace. Un nombre de partición que contiene una comilla simple (y SQL manipulado) puede alterar la cláusula WHERE generada de modo que las búsquedas destinadas a una partición coincidan con filas adicionales. Eso puede afectar lecturas, actualizaciones de estadísticas, objetivos de truncamiento, objetivos de caché de metadatos y operaciones relacionadas cuando metastore.try.direct.sql está habilitado (predeterminado: true). Un llamador autenticado o de confianza de red con la capacidad de invocar las API de nombres de partición de Hive Metastore contra una tabla objetivo (directamente o a través de Hive/otros clientes), cuando el SQL directo está habilitado puede realizar este ataque. Además, el impacto es principalmente dentro de la orientación de tabla y partición (leer/actualizar/truncar/eliminar/almacenar en caché las particiones incorrectas en una tabla a la que pueden hacer referencia), no acceso arbitrario entre bases de datos a través de este error solamente."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "Apache Software Foundation",
"product": "Apache Hive",
"defaultStatus": "unaffected",
"collectionURL": "https://repo.maven.apache.org/maven2",
"packageName": "org.apache.hive:hive-standalone-metastore",
"versions": [
{
"version": "4.0.0",
"lessThanOrEqual": "4.2.0",
"versionType": "semver",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 9.8,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-08-26T03:56:14.451615Z",
"id": "CVE-2026-49845",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-94"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:apache:hive:4.2.0:*:*:*:*:*:*:*",
"matchCriteriaId": "5EBBABEC-E6AB-4106-8445-80964A219DB5"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/apache/hive",
"source": "[email protected]",
"tags": [
"Product"
]
},
{
"url": "https://github.com/apache/hive/commit/ca64f08a8e43db9845b47d5fa2e96f7fdea7288e",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://issues.apache.org/jira/browse/HIVE-29622",
"source": "[email protected]",
"tags": [
"Vendor Advisory"
]
},
{
"url": "https://lists.apache.org/thread/6d56mk501fp4f8cb5wvrpj2jwd9knt05",
"source": "[email protected]",
"tags": [
"Mailing List",
"Vendor Advisory"
]
}
]
}