A depthfirst researcher has shown that database accounts with almost no rights can still reach memory bugs deep in the engine and end up running commands on the server. The work spans PostgreSQL, MySQL, ClickHouse and a claimed no-login Oracle chain, and it undermines a comfortable assumption in many UK threat models.
What happened
On 18 November 2026, Zheng Yu of security firm depthfirst published research titled “Narrow Grants, Wide Engines”. It describes working code execution chains against three of the most widely deployed database engines and a reproduced flaw in a fourth. The central argument is simple: SQL permissions decide which tables and schemas an account can touch, but they barely constrain how much native C and C++ engine code a session can exercise.
The PostgreSQL bug, CVE-2026-116331, is a type confusion in the min/max aggregate optimisation. The PostgreSQL project rates it 8.8 and fixed it in the 12 November point releases across all supported branches. The MySQL flaw, CVE-2026-101786, sits in the optimiser of Server and Cluster 26.7.0 to 26.7.1 and was fixed on 20 October. Oracle’s advisory scores it 7.2 and says it needs high privileges, yet the researcher got code execution using a login whose sole right was creating temporary tables.
Oracle is the most serious case. A bug in Oracle Text, CVE-2026-114819 (CVSS 9.9), patched in Oracle’s November update, chains with CVE-2026-91609, an Oracle REST Data Services GraphQL flaw fixed in October. According to the researcher, the pair lets someone who can only reach the exposed HTTP endpoint run commands as the database service user before any authentication takes place. Oracle rates neither flaw, taken alone, as exploitable without a login.
The fourth target, ClickHouse, has no CVE. The Hacker News reports that ClickHouse said the issue came in through its bug bounty programme and was fixed in early September, with backports to several older release lines. No in-the-wild exploitation has been reported, and the chains have not been independently reproduced.
The technical picture
The offensive insight is not any single bug but the observation that the “harmless” scratch features left open to low-privilege roles are exactly what an exploit developer needs.
- PostgreSQL: a planner shortcut for user-defined aggregates skipped the final conversion step, so the engine could treat a raw integer as a pointer to text, or the reverse. By default, a new login role inherits the TEMPORARY privilege on the database, which lets it build its own tables, indexes, functions and aggregates in a session-local schema. That was enough to turn one type confusion into a memory leak, an ASLR bypass and finally control of execution, without the role ever reading application data.
- MySQL: windowed BIT_OR aggregates sized a counter array when a statement was prepared, but trusted the length of a value bound later at execution time. A longer parameter caused a constrained out-of-bounds write. Ordinary session settings and a temporary table were then used to shape memory and redirect a clean-up routine.
- ClickHouse: the RowBinary string reader added a declared length to the current buffer size without guarding against wraparound. A per-query size limit, format_binary_max_string_size, normally blocks absurd lengths, but under the default configuration an unprivileged HTTP caller could switch it off for their own query.
- Oracle: because the product is closed source, depthfirst describes this chain only at a high level. The key point is that it reaches vulnerable engine code before SQL role checks apply.
In each open-source case the end result was a shell running as the database’s operating system account: postgres, mysql or clickhouse.

Why it matters for UK organisations
A great deal of UK security architecture quietly relies on the database role as a hard boundary. Multi-tenant SaaS platforms give each customer its own role. Analysts, BI tools and suppliers get narrow “read-only” logins. Risk assessments under UK GDPR and supplier assurance questionnaires routinely accept “least-privilege database accounts” as a compensating control.
This research shows that the boundary is only as strong as the memory safety of every engine subsystem those accounts can reach. A leaked credential for a low-value reporting user, a compromised BI tool or a hostile tenant becomes a route onto the server itself. On a self-managed host, that means data files, other databases and often a pivot into the wider network. The researcher notes that PostgreSQL underpins managed services such as Amazon RDS, Neon and Supabase. Cloud customers should confirm with providers how these fixes are being rolled out, rather than assume the platform has absorbed the risk.
The Oracle chain is a different category of problem. Any organisation exposing Oracle REST Data Services to the internet, or even to a broad internal network, has, per the researcher, a pre-authentication path to the engine if neither patch is applied.
Expert view
When we test applications, a database login recovered from a config file or a compromised service is often written up as a medium finding because the account “can only see one schema”. In my experience, that rating rarely considers what the engine will let the account do, as opposed to what it can read. This work is a sharp reminder that SQL authorisation and process isolation are two different controls, and only one of them stops code execution.
The MySQL detail deserves attention from anyone who triages vulnerabilities by vendor score. Oracle’s “high privileges required” label would push many teams to defer the patch. The researcher’s chain needed only temporary-table rights, which are commonly granted across the board because frameworks and reporting tools expect them. Scores describe the vendor’s view of the bug, not your exposure.
Expect more findings of this shape as researchers dig into optimisers, window functions and wire formats, and expect red teams to treat low-privilege database access as a stepping stone rather than an end point.
What to do now
- Patch first. Move PostgreSQL to 18.7, 17.12, 16.16, 15.20 or 14.25 or later. Update MySQL beyond 26.7.1, apply Oracle’s October and November updates for Oracle Database and ORDS, and check ClickHouse builds against the fixed releases. The PostgreSQL, MySQL and Oracle Text flaws are all scored 7.0 or above, so the Cyber Essentials 14-day window for security updates applies.
- Revoke default scratch rights. In PostgreSQL, remove TEMPORARY from PUBLIC where applications do not need it. In MySQL and ClickHouse, replace broad CREATE TEMPORARY TABLES grants on every schema with narrow ones. This maps to the Cyber Essentials user access control and secure configuration controls.
- Lock down client-settable options. In ClickHouse, use settings profiles and constraints so callers cannot relax size limits for their own queries.
- Reduce exposure. Keep ORDS, ClickHouse HTTP interfaces and database listeners off the internet and behind firewalls that only admit application servers.
- Contain the service account. Run database processes with minimal operating system rights, restrict outbound connections from database hosts and alert on shells or unusual child processes spawned by the database user.
- Re-rate old findings. Retest pentest findings where a low-privilege database login was judged low impact.
Bottom line
A short list of grants does not mean a small attack surface. Patch the four engines, strip the temporary-object rights most accounts never use and treat every database login, however restricted, as a possible foothold on the host.
Sources
- depthfirst: Narrow Grants, Wide Engines: Reaching Native Database Attack Surface from Minimal SQL Roles
- The Hacker News: Researcher Demonstrates Database RCE Exploits Affecting PostgreSQL, MySQL and Oracle
- PostgreSQL: CVE-2026-116331: PostgreSQL min/max aggregate type confusion executes arbitrary code
- MySQL: Community security advisory, 20 October 2026