CVE-2026-61789: DBHub: MySQL and MariaDB comment interpretation bypasses read-only SQL validation
Published 2026-11-02 · Updated 2026-11-02 · Also known as GHSA-j656-3hf2-fvjc
Summary
DBHub incorrectly parses SQL comments when interacting with MySQL and MariaDB, allowing attackers to bypass read-only mode protections. Users of @bytebase/dbhub versions prior to 0.22.6 should update immediately to prevent unauthorized write or destructive DDL operations.
Who is affected
The vulnerability affects deployments using MySQL or MariaDB connectors where read-only mode is intended to secure databases accessed by AI agents. By utilizing specific comment-based payload manipulation, an attacker can bypass SQL validation and execute unauthorized write or administrative commands. This exposure is particularly critical in environments where the AI agent processes untrusted input susceptible to prompt injection.
Exploitability
The vulnerability is rated as Medium severity with an AV:N/AC:L/AT:P/PR:N/UI:P vector, indicating it is network-exploitable but requires specific conditions such as user interaction or a vulnerable configuration. While the EPSS score of 0.004 indicates a low current probability of exploit, the flaw poses a significant risk to integrity and availability. It is not currently listed as a CISA Known Exploited Vulnerability.
Remediation
- Upgrade @bytebase/dbhub to version 0.22.6 or later.
- Disable 'multipleStatements' in MySQL and MariaDB connection configurations as a security best practice.
- Ensure the SQL parsing logic is updated to reflect dialect-specific comment handling requirements for MySQL and MariaDB.
How to check your project
- Inspect 'package.json' or lock files to verify if the project uses @bytebase/dbhub versions < 0.22.6.
- Review database connector configurations in 'src/connectors/mysql/index.ts' and 'src/connectors/mariadb/index.ts' for the 'multipleStatements: true' flag.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| npm | @bytebase/dbhub |
>= 0, < 0.22.6 | 0.22.6 | npm install @bytebase/[email protected] |
CVSS 4.0 vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Attack requirements | Present |
| Privileges required | None |
| User interaction | Passive |
| Confidentiality (vulnerable system) | None |
| Integrity (vulnerable system) | High |
| Availability (vulnerable system) | High |
| Confidentiality (subsequent systems) | None |
| Integrity (subsequent systems) | None |
| Availability (subsequent systems) | None |
Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.
FAQ
Is PostgreSQL affected by this vulnerability?
No, PostgreSQL is not affected because its comment parsing consistently treats '--' as a comment regardless of trailing characters, and it executes statements individually.
How does the bypass work?
The application's SQL parser incorrectly identifies malicious commands as comments by failing to require whitespace after '--', while the underlying database engine interprets the characters as active SQL commands.
Does this flaw allow full database control?
Yes, if the bypass is successful, it allows the execution of arbitrary write and DDL statements, such as 'DROP TABLE', which can lead to data loss or unauthorized modifications.
Original advisory description
References
- WEB https://github.com/bytebase/dbhub/security/advisories/GHSA-j656-3hf2-fvjc
- WEB https://github.com/bytebase/dbhub/pull/342
- WEB https://github.com/bytebase/dbhub/commit/872bb338f7d31f6afe517a076ac3e3edafaaaf08
- PACKAGE https://github.com/bytebase/dbhub
- WEB https://github.com/bytebase/dbhub/releases/tag/v0.22.6
Source records: GHSA-j656-3hf2-fvjc (OSV.dev) · EPSS by FIRST, 2026-11-26.