CVE-2026-61789 Details
Description
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Prior to 0.22.6, read-only SQL validation can be bypassed on the MySQL and MariaDB connectors. In `src/utils/sql-parser.ts`, `scanSingleLineComment` treats every double dash as a comment start, whereas MySQL and MariaDB require following whitespace, a control character, or the end of the line. The read-only check in `src/tools/execute-sql.ts` validates split statements with `isReadOnlySQL`, but `src/connectors/mysql/index.ts` and `src/connectors/mariadb/index.ts` execute the original string with `multipleStatements` enabled. A double dash followed by a non-whitespace character can therefore hide a subsequent write or destructive DDL statement from the validator while the database interprets the dashes as minus operators and executes both statements. Anyone able to influence the assistant's SQL, including through prompt injection in content the assistant reads, can bypass read-only mode to modify or drop database data, subject to the database account's privileges. PostgreSQL is not affected by this path because its double-dash parsing agrees with the checker and its connector executes individual split statements. This issue is fixed in version 0.22.6.
A vulnerability exists in the DBHub database MCP server, specifically in versions prior to 0.22.6, within the MySQL and MariaDB connectors. The issue allows for a bypass of read-only SQL validation, enabling the execution of arbitrary write operations and destructive DDL commands, such as dropping tables. This vulnerability arises from a mismatch in comment parsing between DBHub's SQL interpreter and the actual behavior of MySQL and MariaDB. While DBHub incorrectly treats double dashes as comment indicators regardless of following characters, the databases only recognize them as comments when accompanied by whitespace, a control character, or at the line's end. Consequently, statements can be hidden from the read-only validation and executed by the database. The impact is significant, as it undermines the intended protections of read-only mode, which is designed to prevent modifications while allowing data read access. This issue is not present in PostgreSQL, as its comment handling aligns with DBHub's validation approach.
Users can update to DBHub version 0.22.6 or later, where this vulnerability has been fixed. The update ensures that the read-only enforcement is applied at the database engine level, preventing unauthorized write operations and DDL commands.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 30, 2026CISA-ADP
Assessed Nov 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/bytebase/dbhub/security/advisories/GHSA-j656-3hf2-fvjc | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/bytebase/dbhub/commit/872bb338f7d31f6afe517a076ac3e3edafaaaf08 | [email protected] | Source CodeVendor |
| https://github.com/bytebase/dbhub/pull/342 | [email protected] | Source CodeVendor |
| https://github.com/bytebase/dbhub/releases/tag/v0.22.6 | [email protected] | Release NotesVendor |
| https://github.com/bytebase/dbhub/security/advisories/GHSA-j656-3hf2-fvjc | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-436 | Interpretation Conflict | [email protected] |
| CWE-863 | Incorrect Authorization | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| bytebase DBHub | < 0.22.6 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 6, 2026 | CVE Modified | CISA-ADP |
| Oct 30, 2026 | New CVE Received | [email protected] |
Volerion