← News

Researcher Demonstrates RCE in PostgreSQL, MySQL, Oracle and ClickHouse

New flaws allow code execution on database servers with minimal privileges or without login, affecting PostgreSQL, MySQL, Oracle and ClickHouse.

By CyberX I.T SolutionsVulnerabilidades7 min readSource: Researcher Demonstrates Database RCE Exploits Affecting PostgreSQL, MySQL and Oracle ↗Ler em português →

Database accounts with limited privileges, unable to read application tables, can be exploited to execute arbitrary code on the server, according to a recently released technical research. The work, conducted by Zheng Yu of Depthfirst, demonstrates exploitation chains against PostgreSQL, MySQL, ClickHouse, and Oracle Database, showing that SQL permissions do not protect the unsafe C and C++ code of the execution engine.

The vulnerabilities allow an attacker, using only the right to create temporary tables or objects in their own schemas, to trigger memory corruption bugs in the engine code. Although four of the vulnerabilities have already received CVEs and vendor patches, the full attack chains have not been independently reproduced, and there is no evidence of use in real attacks to date.

Database Exploitation Mechanisms

In PostgreSQL, the CVE-2026-116331 vulnerability allows an account with permission to create objects to execute code as the operating system user that runs the database. The fix was released on November 12, affecting versions prior to 18.7, 17.12, 16.16, 15.20, and 14.25. The researcher demonstrated that a simple login role can build the necessary objects in its own temporary schema, without touching application data, turning a type confusion bug into server control.

For MySQL, the CVE-2026-101786 vulnerability resides in the query optimizer, affecting versions 26.7.0 to 26.7.1 of Server and Cluster. Although Oracle's advisory classifies the flaw as requiring high privileges, the researcher achieved code execution with an account that could only create temporary tables, without permission to read existing data, indicating a broader attack surface than the official classification suggests. The fix was made available on October 20.

The Oracle Database case is distinct, as the exploitation does not require a login account. The chain combines a flaw in Oracle Text (CVE-2026-114819, CVSS 9.9) and a vulnerability in the GraphQL interface of Oracle REST Data Services (CVE-2026-91609). When exposed via a web endpoint, the attacker can reach the engine code and execute commands before any authentication. Oracle fixed the Text flaw on November 17 and the GraphQL flaw on October 20, although the company individually assesses that neither is exploitable without login.

Finally, ClickHouse has an integer overflow flaw when reading the binary line format. The researcher reproduced a shell on version 26.7.5.10 by setting the format_binary_max_string_size option to zero. Unlike the other cases, this vulnerability has no assigned CVE nor confirmed patched version, requiring operators to verify directly with the vendor.

Impact and Initial Recommendations

The main technical lesson is that read permissions are not the only risk vector; the ability to create temporary objects or submit specific inputs can bypass logical barriers and reach the engine's native code. The immediate recommendation, in addition to applying patches, is to review write and object creation permissions, removing the TEMPORARY privilege and broad temporary table rights from accounts that do not need these capabilities. However, this measure does not mitigate the Oracle vector, which operates without credential requirements.

CyberX Technical Analysis

The research highlights a fundamental gap in database security modeling: the separation between logical permissions (SQL) and memory safety (C/C++). The database engine processes queries through native code that, in many cases, lacks robust protections against memory corruption, such as buffer overflows or type confusion.

Attack Surface and Privileges

The identified vectors depend on common privileges, such as CREATE TEMP TABLE or CREATE SCHEMA. In production environments, these permissions are often granted to applications or service users for performance optimization or intermediate data processing. The exploitation demonstrates that even without access to sensitive data, the ability to interact with the optimizer or binary format parser can lead to arbitrary code execution.

Technology-Specific Differentiators

  • PostgreSQL: Exploitation via type confusion in temporary objects is critical because the database process runs with system privileges. The recent fix (18.7, 17.12, etc.) is essential.
  • MySQL: The discrepancy between the vendor's classification (high privileges) and the researcher's demonstration (low privileges) suggests that the optimizer can be triggered by seemingly innocuous operations. This requires a deeper review than just the read permission matrix.
  • Oracle: The no-login vector is the most operationally critical. The combination of flaws in web components (REST Data Services) and text (Oracle Text) creates an attack chain that bypasses database access control. Exposure of GraphQL endpoints is an amplifying risk factor.
  • ClickHouse: The lack of a CVE and confirmed patch is a significant risk. Manipulation of binary format parameters (format_binary_max_string_size) indicates that input validation in unstructured data formats is fragile.

Defensive Recommendations

  1. Patch Application: Immediately verify installed versions against the November and October 2026 advisories.
  2. Privilege Review: Rigorously implement the principle of least privilege. Remove CREATE TEMP and CREATE SCHEMA from application accounts that do not need to create temporary objects.
  3. Endpoint Protection: For Oracle, ensure that Oracle REST Data Services and Oracle Text are not exposed directly to the internet without WAF protection and strong authentication, given the no-login vector.
  4. ClickHouse Monitoring: Follow ClickHouse's official channels for the release of the integer overflow patch, considering the application of temporary mitigations, such as restricting binary format parameters, if possible.

CyberX SOC Intelligence Bulletin

New exploitation chains demonstrate that database accounts with minimal privileges can compromise server integrity through memory bugs in the execution engine. The lack of confirmed active exploitation to date allows a remediation window, but the criticality of the Oracle vector (no login) demands immediate attention for exposed environments.

Assets and Exposure Conditions

  • PostgreSQL servers earlier than 18.7, 17.12, 16.16, 15.20 and 14.25.
  • MySQL Server/Cluster installations at versions 26.7.0 and 26.7.1.
  • Oracle Database with Oracle Text (19.3-19.32, 21.3-21.24, 23.4.0-23.26.3) and Oracle REST Data Services (24.2.0-26.2.1) exposed via web.
  • ClickHouse instances at version 26.7.5.10 or similar, especially if they allow low‑privilege users to configure binary format parameters.

Investigation Indicators

Since no specific active‑exploitation IoCs have been published, detection should focus on behavioral anomalies:

  • High‑frequency creation of temporary objects by service accounts that normally do not perform this action.
  • Complex or malformed SQL queries that result in segfault errors or database‑process crashes.
  • Unexpected child processes (shells, interpreters) spawned by the database process (postgres, mysqld, oracle, clickhouse).
  • For Oracle: anomalous web traffic to GraphQL or Oracle Text endpoints, especially from unauthorized IPs, followed by system activity on the database host.

Logs and Telemetry

Correlate database error logs (segfaults, aborts) with authentication and object‑creation logs. In environments with EDR, monitor process creation by database service users. For Oracle, review web‑access logs of the REST and Text components.

Patches and Mitigation

  1. Apply the security patches released in October and November 2026 for PostgreSQL, MySQL and Oracle.
  2. For ClickHouse, monitor the project’s official site for the integer‑overflow fix; until then, restrict users from setting format_binary_max_string_size to zero, if the architecture permits.
  3. Review and reduce temporary‑object and schema creation privileges for application accounts.
  4. Protect Oracle web endpoints (REST Data Services) with a WAF and authentication, given the unauthenticated vector.

Response and Evidence Preservation

In case of suspected compromise, isolate the host, capture memory and processes, and preserve database audit logs. Verify the integrity of database binaries to ensure they have not been replaced with malicious versions.

Frequently Asked Questions

What privileges are needed to exploit the new database flaws?

Exploitation can be performed with only the right to create temporary tables or objects in the attacker’s own schema, and Oracle’s chain can be used without any authenticated login.

Which databases have received CVE identifiers and patches?

PostgreSQL (CVE‑2026‑116331), MySQL (CVE‑2026‑101786), Oracle Text (CVE‑2026‑114819) and Oracle REST Data Services (CVE‑2026‑91609) have CVEs and vendor patches; ClickHouse’s flaw currently has no CVE.

What immediate mitigation steps are recommended?

Apply the released patches, review and remove TEMPORARY and CREATE TEMP TABLE privileges, and monitor for abnormal error logs or process activity.

How can the Oracle vector be exploited without authentication?

By combining a flaw in Oracle Text with a vulnerability in the GraphQL interface of Oracle REST Data Services exposed via a web endpoint, allowing code execution before any login.

Esta análise foi útil?

Ainda não há avaliações.