Read-only bypass in DBHub MySQL and MariaDB connectors via comments
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- None · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-863.
Summary
DBHub, a database MCP server, before 0.22.6 can have its read-only SQL validation bypassed on its MySQL and MariaDB connectors. The validator treats every double dash as a comment, while MySQL and MariaDB require whitespace, a control character, or the end of the line after it, so a later write or destructive DDL statement can escape the check (CWE-436). Anyone able to influence the assistant's SQL, including through prompt injection, can modify or drop data within the database account's privileges. CISA SSVC lists exploitation as poc.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update DBHub to version 0.22.6, which fixes the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA dbhub (bytebase) Fixed in 0.22.6
Timeline
- 2026-10-30 Threatist record created from CVE-2026-61789
- 2026-10-30 Alias added: GHSA-j55q-p8qc-f6wg
- 2026-11-01 Priority changed: MEDIUM → LOW
- 2026-11-06 CISA SSVC decision points changed
- 2026-11-06 Priority changed: LOW → MEDIUM
References
More bytebase vulnerabilities
- TI-2026-44186 DBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution CVSS 4.0CRITICAL 9.3
- TI-2026-44228 @bytebase/dbhub's read-only mode does not prevent database writes CVSS 3.1HIGH 7.4
- TI-2022-13896 bytebase - Improper Authorization CVSS 3.1MEDIUM 4.3
- TI-2022-13895 bytebase - Improper Authorization CVSS 3.1MEDIUM 4.3
- TI-2022-26714 Authentication bypass in Bytebase GitLab self-hosted login CVSS 4.0CRITICAL 9.3
- TI-2026-79259 Authorization bypass in Bytebase exposes other projects' task runs CVSS 4.0MEDIUM 5.3
Sources
- CVE-2026-61789 · CVE Program
- CVE-2026-61789 · NVD
- FIRST EPSS
- GHSA-j55q-p8qc-f6wg · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences