A recent study has revealed vulnerabilities in several prominent database systems, including PostgreSQL, MySQL, and Oracle, demonstrating how low-privilege accounts can be leveraged to execute code on database servers. This revelation underscores the need for enhanced database security measures.
Exploits Targeting PostgreSQL, MySQL, and Oracle
Researcher Zheng Yu from Depthfirst has illustrated how low-privilege accounts can exploit memory-corruption weaknesses within the code that executes SQL queries. These findings encompass proof-of-concept exploits for PostgreSQL, MySQL, ClickHouse, and even a unique Oracle vulnerability that bypasses the need for login credentials.
Despite the severity of these vulnerabilities, there is no evidence that these exploits have been used in actual attacks. The research highlights that SQL permissions primarily govern table and schema access, yet do not mitigate risks posed by memory-unsafe C and C++ code execution.
Vendor Responses to Identified Vulnerabilities
Several of the identified flaws have been addressed with vendor-assigned CVEs and subsequent patches. For instance, PostgreSQL’s vulnerability, marked as CVE-2026-116331, was addressed in a recent security advisory, which credits Yu for the discovery. This flaw enables code execution as the operating system user who runs the database.
Similarly, MySQL’s vulnerability, CVE-2026-101786, impacts versions 26.7.0 to 26.7.1. Oracle’s MySQL advisory categorizes it as high-risk, even though the exploit requires minimal account privileges. Interestingly, Oracle’s vulnerabilities do not require any account access, relying instead on a sequence of bugs in Oracle Text and Oracle REST Data Services.
Implications and Recommendations for Database Security
In light of these discoveries, it is crucial for organizations to implement the latest patches and review account permissions. Limiting the TEMPORARY privilege and rights to create temporary tables can mitigate some risks, although it does not address all potential attack vectors, particularly those involving Oracle.
The research emphasizes the importance of proactive security measures and continuous monitoring of database systems to prevent exploitation of such vulnerabilities. Staying informed about security advisories and updates from vendors is essential in maintaining robust database security.
Additionally, ClickHouse users should be vigilant, as a flaw involving integer-overflow write remains unpatched, and no CVE has been assigned. Operators are advised to consult with vendors for potential fixes and stay alert to any further developments.
