CVE-2026-134803 in DBHub
Summary
by MITRE • 11/23/2026
DBHub before 1.7.0 contains a read-only mode bypass vulnerability that allows MCP clients restricted to readonly execute_sql to run write and DDL statements via backslash-escaped quotes. Attackers can hide stacked statements that clear transaction_read_only or COMMIT inside strings misparsed by scanSingleQuotedString, letting them modify or drop MySQL, MariaDB, or PostgreSQL data.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in DBHub versions prior to 1.7.0 represents a critical security flaw within the database proxy layer that facilitates unauthorized write operations against databases configured for read-only access. This issue specifically impacts Multi-Client Protocol (MCP) clients, which are often granted restricted permissions such as execute_sql with read-only privileges. The core of the problem lies in how DBHub parses SQL strings containing escaped quotes using a function named scanSingleQuotedString. Due to an implementation error in this parsing logic, the system fails to correctly interpret backslash-escaped quotation marks within string literals. This misparsing allows attackers to craft malicious payloads that appear as harmless data values but are actually interpreted by the underlying database engine as executable SQL commands.
The technical mechanism of exploitation relies on the ability to hide stacked statements inside these malformed strings. By utilizing backslash escapes, an attacker can embed critical SQL keywords such as COMMIT or SET TRANSACTION READ ONLY FALSE within a string value that is intended for data insertion or selection. When DBHub processes this input, it incorrectly strips or mishandles the escape sequences, causing the database backend to execute commands like clearing the transaction_read_only flag or committing changes directly. This effectively bypasses the read-only restriction imposed at the proxy level, allowing the client to perform Data Definition Language (DDL) operations and write transactions that should have been blocked entirely.
The operational impact of this vulnerability is severe, as it compromises the integrity and availability of data stored in MySQL, MariaDB, or PostgreSQL databases protected by DBHub. Attackers can not only modify existing records but also drop tables, alter schemas, or execute other destructive DDL statements. This undermines the principle of least privilege, allowing compromised accounts with minimal permissions to escalate their access level dynamically during runtime. The ability to clear transaction read-only flags means that even if a session is initially established as read-only, subsequent queries can transition it into a write-enabled state without proper authentication or authorization checks at each step.
From a classification perspective, this vulnerability aligns with CWE-798, which covers the use of hardcoded credentials or improper access control mechanisms, and more specifically relates to CWE-20 Improper Input Validation where the system fails to sanitize or validate input data correctly before processing. In terms of offensive security frameworks, this technique maps to ATT&CK T1564.003, Hidden Files and Directories, as it involves hiding malicious commands within seemingly benign data structures, and potentially T1078 Valid Accounts if the attacker leverages legitimate but restricted credentials to execute these bypasses. The flaw highlights a critical gap in input sanitization logic for string literals containing escape characters.
To mitigate this vulnerability, organizations must immediately upgrade DBHub to version 1.7.0 or later where the parsing logic for single-quoted strings has been corrected to properly handle backslash escapes and prevent command injection through misparsed literals. Additionally, defense-in-depth strategies should be employed by ensuring that database-level permissions are strictly enforced regardless of proxy configurations. Implementing Web Application Firewalls (WAF) with rules capable of detecting stacked SQL injections or unusual patterns in string parameters can provide an additional layer of protection. Regular audits of MCP client privileges and monitoring for anomalous DDL operations during read-only sessions are also recommended to detect any potential exploitation attempts early.