# Database RCE PoCs Affecting PostgreSQL (CVE-2026-116331), MySQL (CVE-2026-101786), Oracle Database/ORDS (CVE-2026-114819, CVE-2026-91609) and ClickHouse

> Researcher Zheng Yu (Depthfirst) published proof-of-concept remote code execution chains for PostgreSQL, MySQL, ClickHouse and an unauthenticated Oracle Database chain (Oracle Text + ORDS GraphQL). The PostgreSQL, MySQL and Oracle flaws are patched; no in-the-wild exploitation has been reported, and ClickHouse has no CVE or confirmed fixed version.

- **Published:** 2026-11-19T09:48:59Z
- **Last reviewed:** 2026-11-19T09:48:59Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6439
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6439.png
- **ID:** TL-2026-6439
- **Severity:** CRITICAL (CVSS 9.9)
- **Category:** VULNERABILITY
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 6
- **CVEs:** CVE-2026-116331, CVE-2026-101786, CVE-2026-114819, CVE-2026-91609

## Description

Depthfirst researcher Zheng Yu showed that session-scoped database privileges, which are commonly treated as harmless, are enough to reach memory-corruption bugs in native engine code and turn them into operating-system command execution as the database service account. The research ("Narrow grants, wide engines") was published around 2026-11-18 and covered by The Hacker News on 2026-11-19. The article states that no in-the-wild exploitation has been seen and that the full chains were not independently reproduced by the reporter.

PostgreSQL (CVE-2026-116331): a type confusion in the min/max aggregate optimization. A user-defined aggregate created with the SORTOP option makes the planner rewrite the aggregate into a B-tree index lookup and skip FINALFUNC, so the caller reads a raw value with the wrong type (pass-by-value vs pass-by-reference confusion on 64-bit builds). Per Depthfirst the chain yields an information leak, an ASLR bypass and a control-flow hijack through an expanded-object method table leading to system(). It needs only the default TEMPORARY privilege on the database, working entirely inside the role's own pg_temp schema without touching application data. The PostgreSQL advisory rates it CVSS 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), affecting all versions before 18.7, 17.12, 16.16, 15.20 and 14.25; fixes were released 2026-11-12.

MySQL (CVE-2026-101786, Server: Optimizer, MySQL Server and Cluster 26.7.0-26.7.1): an out-of-bounds write in windowed BIT_OR. Item_sum_bit::resolve_type() sizes the counter array for a 511-byte binary value at prepare time, while add_bits() trusts the longer runtime value and its only bounds check is a debug assert. Depthfirst reached code execution as the mysql service account on the official 26.7.0 image with an account holding only CREATE TEMPORARY TABLES ON *.* and no SELECT on application tables. Oracle's October 2026 CPU rates it CVSS 7.2 (PR:H); the article argues the real prerequisite is narrower than that rating implies. The upstream patch rejects oversized operands at runtime for window functions (ER_INVALID_BITWISE_AGGREGATE_OPERANDS_SIZE).

Oracle Database (CVE-2026-114819, Oracle Text, CVSS 9.9; 19.3-19.32, 21.3-21.24, 23.4.0-23.26.3) and Oracle REST Data Services (CVE-2026-91609, GraphQL interface, 24.2.0-26.2.1): chained against an exposed ORDS HTTP endpoint, an unauthenticated attacker can smuggle a crafted document into the database and execute commands as the OS service user before any login. Oracle does not rate either flaw as exploitable without login individually. ORDS was fixed in the October 2026 CPU (2026-10-20) and the database in the November 2026 update (2026-11-17). Primitive-level details are not public (closed source). Note: the Oracle advisory pages returned HTTP 403 to the research client, so Oracle details rely on the Hacker News article and Depthfirst post.

ClickHouse (no CVE assigned): in the RowBinary string deserializer the new buffer size is old size plus declared length without a limit; a length near UINT64_MAX wraps the offset and shrinks the vector without reallocating, so later reads write out of bounds. An unprivileged HTTP caller can set format_binary_max_string_size=0 in the query string under default configuration, disabling the length check; with CREATE TEMPORARY TABLE ON *.* Depthfirst obtained an interactive shell as the clickhouse account on 26.7.5.10. No fixed version is confirmed.

No threat actor, malware family, or network IOCs are associated with this research; the IOC section records detection-relevant artifacts (settings, DDL constructs, error codes, privileges, endpoints) rather than attacker infrastructure, so BeaconBeagle correlation was not applicable.

## MITRE ATT&CK

- T1587.004 Develop Capabilities: Exploits
- T1190 Exploit Public-Facing Application
- T1078 Valid Accounts
- T1203 Exploitation for Client Execution
- T1059 Command and Scripting Interpreter
- T1059.004 Command and Scripting Interpreter: Unix Shell

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**Database Server Process Spawning Shell (PostgreSQL/MySQL/ClickHouse RCE) - Post-Exploitation** (`TL-2026-6439-SPL-002`)

Detects postgres, mysqld or clickhouse-server spawning a shell. All three Depthfirst chains (CVE-2026-116331 via system(), CVE-2026-101786, and the ClickHouse RowBinary overflow) end with command execution as the database service account, so a shell child of the engine is the highest-fidelity post-exploitation signal.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1059, T1059.004, T1068, T1203
- **Data sources:** sysmon_for_linux, auditd, DeviceProcessEvents
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=linux sourcetype="sysmon:linux" EventCode=1
| where match(ParentImage,"(?i)/(postgres|postmaster|mysqld|clickhouse-server|clickhouse)$") AND match(Image,"(?i)/(sh|bash|dash|zsh|ksh|csh)$")
| stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as commands by host User ParentImage Image
| convert ctime(first_seen) ctime(last_seen)
```

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ ("postgres", "postmaster", "mysqld", "clickhouse-server", "clickhouse")
| where FileName in~ ("sh", "bash", "dash", "zsh", "ksh", "csh")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine
```

### Sigma

```yaml
title: Database Server Process Spawning Shell
id: 6b1f2a40-7c1e-4d52-9a31-0f6d8e5c1a02
status: experimental
description: Detects PostgreSQL, MySQL or ClickHouse server processes spawning a shell, the end state of the Narrow Grants Wide Engines RCE chains.
references:
    - https://depthfirst.com/research/narrow-grants-wide-engines
    - https://thehackernews.com/2026/11/researcher-demonstrates-database-rce.html
author: Threadlinqs Team
date: 2026/11/19
tags:
    - attack.execution
    - attack.t1059
    - attack.t1059.004
    - attack.privilege-escalation
    - attack.t1068
    - attack.t1203
    - cve.2026-116331
    - cve.2026-101786
logsource:
    category: process_creation
    product: linux
detection:
    selection_parent:
        ParentImage|endswith:
            - '/postgres'
            - '/postmaster'
            - '/mysqld'
            - '/clickhouse-server'
            - '/clickhouse'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/zsh'
            - '/ksh'
            - '/csh'
    condition: selection_parent and selection_child
falsepositives:
    - PostgreSQL archive_command or restore_command or COPY PROGRAM configured by administrators
    - ClickHouse executable user-defined functions or dictionaries that invoke scripts
level: critical

```

**Known false positives:**

- archive_command / restore_command / COPY PROGRAM used by DBAs
- ClickHouse executable UDFs or MySQL backup wrappers invoked from the service

**Tuning notes:** Allowlist exact CommandLine values for archive_command and backup scripts. Require ParentImage to be the database binary path. Enrich with User to confirm the service account.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- ClickHouse HTTP Request Setting format_binary_max_string_size=0 - Exploitation (locked: unlock with TL Creds)
- Oracle Database or ORDS Process Spawning Shell or Download Tool (CVE-2026-114819 / CVE-2026-91609) - Post-Exploitation (locked: unlock with TL Creds)
- Reverse Shell Command Line Run by Database Service Account - C2 (locked: unlock with TL Creds)
- MySQL Windowed BIT_OR Abuse and Oversized-Operand Rejection (CVE-2026-101786) - Exploitation (locked: unlock with TL Creds)
- Database Engine Backend Crash by Memory-Corruption Signal - Post-Exploitation / Failed Exploitation (locked: unlock with TL Creds)
- External Access to Oracle ORDS GraphQL Endpoint (CVE-2026-91609 + CVE-2026-114819 pre-auth chain) (locked: unlock with TL Creds)
- PostgreSQL CREATE AGGREGATE with SORTOP by Non-Admin Role (CVE-2026-116331) - Exploitation (locked: unlock with TL Creds)
- Database Service Account Outbound Connection to Public IP (Reverse Shell / C2) - C2 (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [The Hacker News: Researcher Demonstrates Database RCE Exploits Affecting PostgreSQL, MySQL and Oracle](https://thehackernews.com/2026/11/researcher-demonstrates-database-rce.html)
- [Depthfirst: Narrow grants, wide engines (technical analysis)](https://depthfirst.com/research/narrow-grants-wide-engines)
- [PostgreSQL security advisory CVE-2026-116331](https://www.postgresql.org/support/security/CVE-2026-116331/)
- [MySQL security advisory 2026-10-20 (CVE-2026-101786)](https://dev.mysql.com/community/security/advisories/2026-10-20/)
- [Oracle Critical Patch Update October 2026 (ORDS CVE-2026-91609, MySQL)](https://www.oracle.com/security-alerts/cpuoct2026.html)
- [Oracle Security Update November 2026 (Oracle Database CVE-2026-114819)](https://www.oracle.com/security-alerts/cspunov2026.html)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-6439
