Fix CVE-2026-83497: OpenSearch SQL Plugin Deserialization RCE via Cursor Pagination
Fix CVE-2026-83497: OpenSearch SQL Plugin Deserialization RCE via Cursor Pagination
If you run OpenSearch โ self-managed or Amazon OpenSearch Service โ and have the SQL plugin enabled, a user with nothing more than basic read/search rights can get arbitrary code execution on your cluster right now. CVE-2026-83497, published August 31, 2026, is an unrestricted Java deserialization bug in the SQL plugin's cursor pagination feature. It carries a CVSS 3.1 base score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) โ network-exploitable, low complexity, no user interaction, and full confidentiality/integrity/availability impact once triggered.
This isn't a theoretical config-mistake bug. If your cluster exposes the SQL plugin to anyone below full-admin trust โ a BI tool's service account, an analyst with a read-only role, a dashboard that runs ad-hoc SQL โ that's already enough privilege to exploit it.
What actually broke
The SQL plugin's cursor pagination lets a client fetch large result sets in pages: run a query, get back a cursor token, send that token back to plugins/sql (or plugins/sql/close) to get the next page. Under the hood, that cursor token is a serialized Java object that gets deserialized server-side when it comes back in.
The plugin never restricted what classes were allowed to be deserialized from that cursor. An attacker who can reach the /_plugins/_sql (or legacy /_opendistro/_sql) endpoint with any account that has read/search privileges on at least one index can:
- Run a normal SQL query with pagination enabled (
fetch_sizeset) to get a legitimate cursor. - Replace that cursor's payload with a crafted serialized object chain โ a classic Java deserialization gadget chain, the same family of bug behind things like the 2015 Apache Commons Collections RCEs โ targeting classes present on the server's classpath.
- Send it back to the cursor endpoint. The server deserializes it and executes attacker-controlled code in the context of the OpenSearch process.
This maps to CWE-502 (Deserialization of Untrusted Data). No authentication bypass, no privilege escalation bug required first โ the SQL plugin's own read permission is sufficient, because pagination was never designed with the assumption that the cursor itself is attacker-modifiable data. That assumption failure is the whole bug.
Who's affected
| Deployment | Vulnerable versions | Fixed in |
|---|---|---|
| OpenSearch SQL plugin (self-managed, open source) | 2.8 through 3.6 | 2.19.6, 3.7.0 |
| Amazon OpenSearch Service (AWS managed) | 2.9 through 3.5 | Latest service software update (no engine version change required) |
You're at elevated risk if:
- The SQL plugin is enabled (it is, by default, on most OpenSearch installs and on Amazon OpenSearch Service domains that haven't explicitly disabled it), and
- Any account other than your most trusted admins has
read/searchaccess to any index โ which in practice is almost every production cluster with a BI tool, a support dashboard, or a data analyst role.
How to check if you're affected
Self-managed OpenSearch โ check the running version and whether the SQL plugin is installed:
1curl -s -u admin:yourpassword https://localhost:9200 | grep number
2curl -s -u admin:yourpassword https://localhost:9200/_cat/plugins | grep sql
If the version falls in 2.8โ3.6 and opensearch-sql shows up in the plugin list, you're exposed.
Amazon OpenSearch Service โ check the domain's current service software version and whether an update is available:
1aws opensearch describe-domain \
2 --domain-name your-domain-name \
3 --query 'DomainStatus.ServiceSoftwareOptions'
Look at CurrentVersion and UpdateAvailable. If UpdateAvailable is true, AWS has already shipped the fixed service software for your domain and you just haven't applied it yet.
You can also directly test exposure of the endpoint (read-only check, doesn't exploit anything) from an account with only search privileges:
1curl -s -u readonly_user:password -X POST "https://your-cluster:9200/_plugins/_sql?format=json" \
2 -H 'Content-Type: application/json' \
3 -d '{"query": "SELECT * FROM your-index LIMIT 1", "fetch_size": 1}'
If this returns a cursor field in the response, that account can reach the vulnerable pagination path.
Patching
Self-managed OpenSearch, upgrade the cluster (and the SQL plugin along with it โ it ships bundled with the distribution, not as a separate install for most deployments) to 2.19.6 or 3.7.0:
1# Docker-based deployments
2docker pull opensearchproject/opensearch:2.19.6
3# or
4docker pull opensearchproject/opensearch:3.7.0
For Helm-based Kubernetes deployments, bump the image tag in your values file and roll the StatefulSet the normal way โ a rolling restart, not a full cluster bounce, if your cluster is set up for it:
1helm upgrade opensearch opensearch/opensearch \
2 --set image.tag=2.19.6 \
3 --reuse-values
Amazon OpenSearch Service, apply the available service software update โ no engine version upgrade is required, this ships as a service software patch:
1aws opensearch start-service-software-update --domain-name your-domain-name
Or via the console: OpenSearch Service โ your domain โ Actions โ Upgrade โ apply the available service software update. AWS applies these during your domain's configured maintenance window unless you request an immediate update, so check AutomatedUpdateDate in the describe-domain output above if you're relying on the automatic path rather than triggering it yourself.
If you can't patch immediately
There's no vendor-published interim mitigation beyond patching, but two things meaningfully shrink the window:
- Disable the SQL plugin entirely if nothing in your stack actually uses it:
plugins.sql.enabled: falseinopensearch.yml, cluster-wide viaPUT _cluster/settingswith{"persistent": {"plugins.sql.enabled": false}}, or (Amazon OpenSearch Service) through the domain's advanced cluster settings. - Restrict which roles can reach
_plugins/_sqlat all, independent of whether they otherwise havereadon an index. OpenSearch's fine-grained access control lets you deny the SQL plugin's action group (cluster:admin/opensearch/sql*) separately from index-level read permissions โ so a BI tool's service account can keep its normal index access without being able to hit the vulnerable endpoint if it doesn't actually need SQL syntax (many BI integrations can use the REST Query DSL or the PPL path instead, which this CVE doesn't touch).
Neither of these is a substitute for patching โ they reduce exposed surface, they don't fix the deserialization flaw itself.
Best practices for SQL-plugin-enabled clusters going forward
- Treat the SQL plugin as a privileged surface, not a read-only convenience. This CVE is the second SQL-plugin-specific advisory this year (CVE-2026-18428, an async query validation bypass, shipped earlier) โ the plugin has a real pattern of trusting client-supplied state more than it should.
- Scope who gets SQL access separately from who gets index read access. Most "give the analyst read access" requests don't actually need raw SQL โ the Query DSL or PPL cover the same ground without the cursor-deserialization attack surface.
- Subscribe to AWS Security Bulletins for OpenSearch specifically, not just your general AWS notifications โ bulletin volume for OpenSearch has picked up as the SQL/PPL plugin surface has grown, and these don't always make it into a general "what's new" digest.
- Track service software update lag on your OpenSearch Service domains the same way you'd track patch lag on EC2.
UpdateAvailable: truesitting unapplied for weeks is the same risk category as an unpatched AMI.
Common mistakes to avoid
- Assuming "AWS managed" means "AWS already patched it for me." Amazon OpenSearch Service ships the fix as an available service software update โ it does not force-apply automatically the moment a CVE drops. You still have to check
UpdateAvailableand apply it (or wait for your maintenance window, which may be days or weeks away). - Patching the cluster but leaving the SQL plugin's action-group permissions untouched. If your access control model was already too permissive (every read-only role can hit
_plugins/_sql), patching this one CVE doesn't fix that structural exposure โ the next SQL-plugin bug will hit the same overly broad set of accounts. - Confusing this with Elasticsearch's unrelated deserialization history. OpenSearch forked from Elasticsearch in 2021 and the SQL plugins have diverged significantly since; check advisories against the actual distribution and version you run, not a general "search engine deserialization" assumption.
- Only checking production and skipping staging/dev clusters. Non-prod clusters frequently have looser access control (shared credentials, broader read grants) specifically because "it's not prod" โ which makes this bug easier to trigger there, not harder.
Troubleshooting
aws opensearch describe-domain shows UpdateAvailable: false but I know my version is in the vulnerable range. Confirm you're checking the right domain name and region โ describe-domain is region-scoped. If it's genuinely not offering an update yet, AWS staggers service software rollouts by region; check again in a day or contact AWS Support referencing the bulletin if it's been more than a few days since August 31, 2026.
I disabled the SQL plugin but a dashboard broke. Something in your stack is issuing SQL queries directly (common with certain BI connectors that default to the SQL/JDBC-style OpenSearch driver rather than the native REST client). Check the connector's configuration for a Query DSL or PPL mode before falling back to re-enabling SQL โ if you must re-enable it, pair it with the action-group restriction above rather than leaving it fully open.
I applied the service software update but describe-domain still shows the old CurrentVersion. Updates can take from several minutes to a few hours depending on cluster size and shard count, since AWS performs it as a rolling operation across nodes. Poll describe-domain again after a wait rather than assuming the start-service-software-update call itself completed synchronously โ it only starts the process.
FAQ
Does this affect Elasticsearch clusters too? No โ this CVE is specific to the OpenSearch SQL plugin's implementation. Elasticsearch's SQL feature is a separate, independently-maintained codebase since the 2021 fork and isn't referenced in this advisory.
Do I need to rotate any credentials after patching, like a typical RCE response?
Treat any cluster that had the SQL plugin reachable by untrusted or lower-trust accounts as potentially compromised until you've reviewed logs for suspicious _plugins/_sql activity around and after August 31, 2026 โ not because patching itself requires rotation, but because RCE via this path could have been used to read secrets, index credentials, or IAM role metadata (on EC2-adjacent deployments) before you patched. If you find nothing suspicious in access logs, standard practice is still worth following: don't skip the log review just because the patch itself is a version bump.
Is Amazon OpenSearch Serverless affected the same way? The AWS bulletin's affected-version range applies to standard Amazon OpenSearch Service domains. Serverless collections are managed differently (AWS controls the underlying software lifecycle directly, with no customer-triggered version), so check your Serverless collections against AWS's current guidance separately rather than assuming the same manual-update steps apply.
What's a realistic timeline to treat this as "patch now" versus "patch this sprint"? CVSS 8.8 with no authentication bypass required and confirmed RCE puts this solidly in "patch now" territory for any cluster where the SQL plugin is reachable by more than your most trusted admins โ which, per the access-check above, is most production clusters. If your SQL plugin genuinely has zero external or semi-trusted callers (verified, not assumed), it's reasonable to fold the fix into your next scheduled maintenance window instead of an emergency change.
Key takeaways
| Item | Detail |
|---|---|
| CVE | CVE-2026-83497 |
| CVSS 3.1 | 8.8 (High) โ AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CWE | CWE-502, Deserialization of Untrusted Data |
| Root cause | SQL plugin cursor pagination deserializes client-supplied tokens without restriction |
| Privilege required | Basic read/search access to the SQL plugin endpoint |
| Self-managed fix | Upgrade to OpenSearch 2.19.6 or 3.7.0 |
| AWS managed fix | Apply available service software update (start-service-software-update), no engine version change |
| Interim mitigation | Disable SQL plugin, or restrict its action group separately from index read access |
| Published | August 31, 2026 |