Summary
CVE-2026-79536 is a critical SQL injection (CWE-89) vulnerability in DBHub, the open-source MCP (Model Context Protocol) database server maintained by Bytebase, affecting the MySQL and MariaDB connectors in version 1.2.0 and earlier. The flaw lets a crafted SQL statement bypass DBHub’s "read-only mode" safety guarantee, allowing an attacker to write to, or drop tables from, a database the operator believed was exposed read-only. It carries a CVSS v3.1 base score of 9.1 (Critical).
Technical details
- Root cause: DBHub’s SQL classifier (
scanTokenMySQLinsrc/utils/sql-parser.ts) does not recognize#as a single-line comment delimiter for the MySQL/MariaDB dialect, even though MySQL and MariaDB servers do treat#as starting a comment. - Trigger conditions: An attacker submits a statement containing a
#-prefixed region followed by a second,;-separated statement. The classifier parses the#region as an ordinary string and sees only one harmless leading read statement, so it approves the request as read-only. - Execution path: DBHub’s MySQL/MariaDB connections are opened with
multipleStatementsenabled, and the original, unmodified SQL string (not the classifier’s sanitized view) is forwarded to the database driver. The database itself interprets#as a comment, so it sees and executes both statements — including the hidden write or DDL statement. - Attack vector: Network; no authentication is required in DBHub’s tested default configuration, since its HTTP transport is exposed unauthenticated. The payload can be delivered by any MCP client, or by an LLM agent driving one, that can reach the
execute_sqltool configured withreadonly = true. - Impact: Defeats the read-only enforcement operators rely on when exposing a database to an AI agent, enabling arbitrary writes and destructive DDL (e.g.,
DROP TABLE) or data modification against a MySQL or MariaDB backend.
Affected software
- DBHub (
@bytebase/dbhub, github.com/bytebase/dbhub) version 1.2.0 and earlier - Specifically impacts the MySQL and MariaDB connectors when the
execute_sqltool is configured withreadonly = true - Later releases had not been assessed for this issue as of the advisory’s publication
Severity
- CVSS v3.1 Base Score: 9.1 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Mitigation and recommended actions
- Immediate: No patched DBHub version had been published or confirmed at the time this advisory was disclosed. Monitor the
bytebase/dbhubrepository and upgrade as soon as a fix is released. - Workarounds (no patch available):
- Disable
multipleStatementson MySQL/MariaDB database connections used by DBHub, so stacked statements cannot execute regardless of the classifier’s decision. - Enforce read-only access at the database layer itself — via a read-only transaction or a least-privilege database account — rather than relying solely on DBHub’s client-side SQL classifier.
- Restrict and authenticate network access to DBHub’s HTTP transport, since it is reachable without authentication by default.
- Disable

