Security incident · GHSA-j656-3hf2-fvjc
DBHub: MySQL and MariaDB comment interpretation bypasses read-only SQL validation
Published Nov 2, 2026 · catalog updated Nov 2, 2026 · DBHub: MySQL and MariaDB
Last checked Nov 7, 2026. A connected source was read within the last 7 days.
Open the advisory
Exploitation likelihood is not on this record for GHSA-j656-3hf2-fvjc. A missing EPSS score is not a low risk. Compare DBHub: MySQL and MariaDB with the linked advisory before you change production.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (DBHub: MySQL and MariaDB).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- EPSS is missing. A missing score is not a low risk.
- Severity
- Medium—
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- Awaiting synchronization with FIRST
- Remediation
- Version ranges on file
- Affected products
- npm @bytebase/dbhub
The read-only mode can be bypassed on the MySQL and MariaDB connectors. In read-only mode a caller can still execute arbitrary write and DDL statements (for example DROP TABLE), which defeats the protection that read-only mode is meant to provide when a database is exposed to an AI agent. Root cause The problem is a mismatch between how DBHub's SQL parser handles single-line comments and how MySQL and MariaDB actually parse them. In src/utils/sql-parser.ts, scanSingleLineComment treats "--" as the start of a comment no matter what character follows it. MySQL and MariaDB only begin a "--" comment when the two dashes are followed by whitespace, a control character, or the end of the line. Otherwise the dashes are read as two minus signs and the rest of the line is ordinary SQL. The read-only check in src/tools/execute-sql.ts splits the input and validates each statement with isReadOnlySQL, but the connector then executes the original, unmodified string. The MySQL and MariaDB connectors open their connection pool with multipleStatements: true (src/connectors/mysql/index.ts:54 and src/connectors/mariadb/index.ts:53) and run the whole string in a single call. Because of this, the following payload: SELECT 1--1;DROP TABLE victim is seen by DBHub as a single SELECT statement, since everything after "--" is treated as a comment and the read-only check passes. MySQL and MariaDB instead parse it as "SELECT 1 - -1" followed by "DROP TABLE victim" and execute both statements. Proof of concept 1) DBHub's own parser. Running splitSQLStatements and isReadOnlySQL from this repository on the payload returns a single statement and readOnly = true, so the query is allowed in read-only mode. The same code correctly rejects "SELECT 1; DROP TABLE victim", which confirms that the "--1" is what gets through. 2) Execution. Connecting to MariaDB 11.4 with mysql2 and multipleStatements: true (the same option the connector uses) and sending the payload returns 2 for the first statement, which
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- npm @bytebase/dbhub< 0.22.6
How to fix GHSA-j656-3hf2-fvjc
Upgrade
GHSA-j656-3hf2-fvjc lists a fix boundary at 0.22.6. Compare the installed build with that boundary before you change production.
Version check
Affected < 0.22.6
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
Exploitation likelihood is not on this record for GHSA-j656-3hf2-fvjc. A missing EPSS score is not a low risk. Compare DBHub: MySQL and MariaDB with the linked advisory before you change production.
Which versions are affected?
Compare what you have installed with < 0.22.6. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-436; CWE-863: Incorrect Authorization. EPSS is not on this record yet. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Nov 2, 2026 · GitHub Advisory Database
Detected
The read-only mode can be bypassed on the MySQL and MariaDB connectors. In read-only mode a caller can still execute arbitrary write and DDL statements (for example DROP TABLE), which defeats the protection that read-only mode is meant to provide when a database is exposed to an AI agent. Root cause The problem is a mismatch between how DBHub's SQL parser handles single-line comments and how MySQL
Nov 2, 2026 · GitHub Advisory Database
Updated
The read-only mode can be bypassed on the MySQL and MariaDB connectors. In read-only mode a caller can still execute arbitrary write and DDL statements (for example DROP TABLE), which defeats the protection that read-only mode is meant to provide when a database is exposed to an AI agent. Root cause The problem is a mismatch between how DBHub's SQL parser handles single-line comments and how MySQL
Sources
- GitHub Advisory DatabasePackage advisoryGHSA-j656-3hf2-fvjc
DBHub: MySQL and MariaDB comment interpretation bypasses read-only SQL validation
github.com
References
Freshness
Last verified in this catalog Nov 2, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- GitHub Advisory DatabaseNov 7, 2026