Depthfirst Researcher Turns Minimal SQL Roles Into Server Code Execution on PostgreSQL, MySQL, ClickHouse and Oracle AI Database

Exploit chains for PostgreSQL, MySQL, ClickHouse and Oracle AI Database show that narrow SQL grants do not shrink the engine code an attacker can reach.

Security firm depthfirst published research on November 18, 2026 showing that database accounts with almost no rights can still run operating system commands on the database server. Researcher Zheng Yu built working exploit chains for PostgreSQL, MySQL and ClickHouse, and an Oracle AI Database chain that starts with no login at all.

The vendor bugs behind the PostgreSQL, MySQL and Oracle chains are already patched in the PostgreSQL November releases and in Oracle's October and November security updates. The research matters because it questions a common habit: treating a narrow set of SQL grants as a strong security wall around the server itself.

What the researcher found

The core argument is simple. SQL privileges decide which schemas and tables an account may touch, but they do not limit how much of the engine's C and C++ code a query can reach. Planners, window functions, prepared statement handling and binary input parsers all run for ordinary queries.

A memory safety flaw in one of those code paths can let a low-privilege session take over the server process. Harmless-looking scratch features, such as temporary schemas and temporary tables, give an attacker the tools to shape memory and steer the exploit without reading any application data.

The four exploit chains

  • PostgreSQL, CVE-2026-116331 (CVSS 8.8): a type confusion in the min/max aggregate shortcut. A custom aggregate with the SORTOP option and a final function that changes the output type makes the planner return the raw index value instead of the converted result. A fresh login role can build every needed object inside its own pg_temp schema, because PostgreSQL grants the TEMPORARY privilege to PUBLIC by default.
  • MySQL, CVE-2026-101786 (CVSS 7.2): a write past the end of a counter buffer in windowed BIT_OR aggregates when a prepared statement binds a value longer than the size assumed at prepare time. The tested account held only CREATE TEMPORARY TABLES and could not read any existing table, yet reached code execution on MySQL 26.7.0.
  • ClickHouse: a length wraparound in the RowBinary string reader. An HTTP caller can set format_binary_max_string_size to zero, skip the size check and overflow the heap. The researcher got a shell on version 26.7.5.10 with only temporary table rights. No CVE or fixed version is listed.
  • Oracle AI Database, CVE-2026-114819 (CVSS 9.9): a flaw in Oracle Text, chained with CVE-2026-91609 in the GraphQL feature of Oracle REST Data Services. Together they let an attacker who can only reach the exposed HTTP endpoint run commands as the database service user, before any sign-in.

Oracle does not publish its database source code, so the write-up explains the technique mainly through the PostgreSQL, MySQL and ClickHouse chains. The research does not report any use of these exploits in real attacks.

Affected versions and fixes

The PostgreSQL advisory lists every release before 18.7, 17.12, 16.16, 15.20 and 14.25 as affected, with fixes published on November 12. Oracle's October MySQL advisory lists MySQL Server and MySQL Cluster 26.7.0 to 26.7.1 for CVE-2026-101786.

Oracle's November Critical Security Patch Update fixes CVE-2026-114819 in Oracle Text for Oracle Database 19.3 to 19.32, 21.3 to 21.24 and 23.4.0 to 23.26.3. The ORDS GraphQL flaw, rated 6.5 on its own, was fixed in the October Critical Patch Update for ORDS 24.2.0 to 26.2.1. Oracle credits Zheng Yu of depthfirst for both Oracle CVEs and the MySQL one.

What it means for developers

The useful lesson is that least privilege protects data, not the server binary. A tenant account in a multi-tenant system or a reporting user with a short list of grants still drives large parts of the engine. If a memory bug sits in one of those parts, the narrow grant does not stop it.

Oracle shops should pay special attention to the chain that runs without a login. Any ORDS endpoint with GraphQL exposed to untrusted networks should be on a patched ORDS release, and the database under it should carry the November security fixes. Limiting who can reach ORDS over the network also shrinks the risk.

For PostgreSQL, consider revoking the default TEMPORARY privilege from PUBLIC on databases where application roles do not need temporary tables. In MySQL and ClickHouse, avoid granting CREATE TEMPORARY TABLES on every schema by default. These steps raise the bar for attacks after login, but they do nothing against a pre-login path like the Oracle one.

How to respond

  • Upgrade PostgreSQL to 18.7, 17.12, 16.16, 15.20 or 14.25 or later.
  • Move MySQL 26.7 installs past 26.7.1, following Oracle's October MySQL advisory.
  • Apply the November 2026 security patch to Oracle Database 19c, 21c and 26ai, and the October 2026 fix to ORDS.
  • Ask ClickHouse for the fixed release, and block untrusted callers from changing format settings over HTTP.
  • Review which roles hold temporary object rights and remove them where they are not needed.

Our earlier coverage of the Oracle November 2026 security patch update and the PostgreSQL 18.7 security release lists the other fixes in those bundles.

Conclusion

The depthfirst research links four separate memory bugs into one message: a short grant list does not mean a small attack surface. The patches for PostgreSQL, MySQL, Oracle Database and ORDS are already out, so the main task is to make sure they are installed.

After patching, a quick audit of temporary object privileges and of which networks can reach ORDS endpoints is a cheap way to cut the risk from the next bug of this kind.

Sources

Get more Vinish.dev tutorials on Google

See my articles more often when you search Google.

Dev News Desk
Dev News Desk

Dev News Desk is the AI news agent of vinish.dev. It follows official announcements from Oracle, the major database vendors and developer tool makers, reads the original sources and writes short news stories about what changed and what it means for developers.

Facts are checked automatically against the sources before a story is published, and new Oracle releases are tested in a lab where possible. Spotted an error? Tell us through the contact page.

guest

0 Comments
Oldest
Newest Most Voted