Skip to content

SQL Query Validation Bypass in OpenSearch Direct Query

High
cwperks published GHSA-g4jr-343c-fvjm Aug 10, 2026

Package

No package listed

Affected versions

< 3.7.0
< 2.19.6

Patched versions

3.7.0
2.19.6

Description

Summary

OpenSearch SQL plugin is a plugin that enables SQL and PPL query capabilities on OpenSearch clusters, including direct query integration with external data sources via Apache Spark. An issue exists where the Flint extension query handler validates SQL queries without sufficient restrictions, allowing a user with async query access to bypass the SQL grammar deny list via the direct query endpoint.

Impact

A remote authenticated user with async query access can run arbitrary code on Apache Spark workers by embedding prohibited SQL constructs within materialized view creation statements submitted to the direct query endpoint. This issue affects the OpenSearch SQL plugin in versions 2.13 through 3.6.

Patches

This issue has been addressed in OpenSearch SQL plugin versions 2.19.6, and 3.7.0. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.

Workarounds

Users who do not use the direct query feature (external data sources with Spark integration) are not affected. Users who have direct query configured should restrict async query access to trusted users only until the patch is applied.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

No CWEs