Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant prompt injection in assistant-readable content
-
DeliveryAssistant issues crafted 'SELECT 1--1;' query
-
ExploitDouble-dash hides stacked statement from validator
-
ExecutionMySQL/MariaDB execute both via multipleStatements
-
ImpactWrite or drop database data within account privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V4 - API and Web Service Interpretation consistency
|
| Exploitation Conditions | Requires DBHub prior to 0.22.6 connected via the MySQL or MariaDB connector (PostgreSQL is explicitly unaffected, and this path does not reach the Oracle/SQL Server/SQLite connectors), with read-only mode actually enabled - that is the control being bypassed. The MySQL/MariaDB connection pools run with multipleStatements:true (the connector default per the advisory), and execute-sql.ts validates the split statements with isReadOnlySQL but then sends the original unmodified string to the database. The attacker must be able to influence the SQL the assistant issues, most realistically through prompt injection in content the assistant reads. Limiting factors that reduce realistic risk: the destructive impact is bounded by the database account's privileges, exploitation depends on read-only mode being in use and on the assistant processing attacker-controlled content, and deployments using only PostgreSQL or the unaffected connectors are not exposed by this path. |
| Impact | The supplied 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, base 6.1, medium) is internally consistent with the mechanism: network-reachable (AV:N), no authentication to the MCP layer in the realistic threat model (PR:N), but a precondition is Present (AT:P) because read-only mode must actually be in use and attacker-influenced content must reach the assistant, and user/agent interaction is passive (UI:P). Impact is confined to integrity and availability (VI:H/VA:H - arbitrary writes and destructive DDL such as DROP TABLE) with no added confidentiality loss (VC:N), since read access is already permitted in read-only mode. On the authorization-control severity this is genuinely high - read-only mode is the exact protection operators rely on when exposing a database to an AI agent, and the bypass defeats it - but several signals pull real-world urgency down to medium. The vuln.today decision label is 'this_month', not act_now/emergency. The vulnerability is NOT listed in CISA KEV (no confirmed active exploitation). No EPSS score was provided, so statistical exploitation probability is unknown and cannot be weighed. A detailed PoC is written out in the GHSA advisory, but the input does not mark it 'Publicly available (confirmed)', so it should be treated as a public PoC description, not verified working exploit code. Net: a real and credible authorization bypass whose practical reach is limited by narrow preconditions (MySQL/MariaDB connector + read-only mode + attacker-controlled SQL) and a small deployment footprint, rather than a mass-exploitation emergency. |
| Exploit ScenarioDerived | An operator runs DBHub in read-only mode so an AI assistant can query a MySQL or MariaDB database safely, and an attacker plants instructions inside content the assistant later reads (a document, web page, ticket, or table row). Via prompt injection the assistant is steered to send a query such as 'SELECT 1--1;DROP TABLE victim'; DBHub's validator treats everything after '--' as a comment and approves a lone SELECT, but the connector runs the original string with multipleStatements enabled, so MySQL/MariaDB parse '1--1' as minus operators and then execute the stacked DROP. A public PoC description exists in the advisory; it is not verified as working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Read-only mode in Bytebase DBHub before 0.22.6 can be bypassed on the MySQL and MariaDB connectors, allowing write and destructive DDL statements such as DROP TABLE to reach the database through the MCP execute-SQL tool. The root cause is an interpretation conflict: DBHub's scanner treats every '--' as a line comment, while MySQL and MariaDB only start a comment when whitespace follows, so a payload like 'SELECT 1--1;DROP TABLE victim' passes the read-only classifier and is still executed in full because the connectors run with multipleStatements enabled. Unauthenticated remote attackers must be able to influence the SQL the assistant issues - most realistically via prompt injection in content the assistant reads - and read-only mode must actually be enabled for the bypass to matter; a proof-of-concept payload is documented in the public advisory, no confirmed public exploit code or CISA KEV entry exists at time of analysis, and the issue is fixed in 0.22.6.
RemediationAI
Upgrade to @bytebase/dbhub 0.22.6, the version that fixes this issue; the release (https://github.com/bytebase/dbhub/releases/tag/v0.22.6) follows PR https://github.com/bytebase/dbhub/pull/342 and commit 872bb338f7d31f6afe517a076ac3e3edafaaaf08, which stop executing the original unvalidated SQL string, make the '--' comment scanner dialect-aware for MySQL and MariaDB, and add a per-execution READ ONLY transaction backstop at the connector layer. The vendor advisory is at https://github.com/bytebase/dbhub/security/advisories/GHSA-j656-3hf2-fvjc. If upgrading immediately is not possible, the effective compensating control is to connect DBHub's MySQL/MariaDB connectors with a database account whose grants are limited to SELECT on the relevant schemas, so any stacked write or DDL that slips past the classifier fails at the engine - the trade-off is that this also prevents any legitimate write the assistant is expected to perform and will surface as execution errors rather than clean read-only rejections. Restricting which content the assistant is allowed to read, or disabling read-only-mode reliance on the affected connectors, is not a complete fix because the bypass targets exactly that control.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is classified as CWE-436 (interpretation conflict) with an authorization-bypass consequence (CWE-863). DBHub is a database MCP server that exposes SQL execution to an AI assistant; its read-only guarantee is implemented in layers that disagree with the backend's own parser. In src/utils/sql-parser.ts, scanSingleLineComment marks '--' as the start of a single-line comment regardless of the following character, whereas MySQL and MariaDB only begin a '--' comment when the dashes are followed by whitespace, a control character, or end of line - otherwise the dashes are two minus operators. src/tools/execute-sql.ts splits the input and validates each fragment with isReadOnlySQL, but src/connectors/mysql/index.ts and src/connectors/mariadb/index.ts open their pools with multipleStatements: true and send the original, unmodified string in one call, so a stacked statement hidden after '--' is neither validated nor prevented. During review, splitSQLStatements/isReadOnlySQL returned a single read-only statement for 'SELECT 1--1;DROP TABLE victim' while MariaDB 11.4 executed both statements. The project's fix (PR #342) stops executing the unvalidated original string, makes the comment scanner dialect-aware for MySQL/MariaDB, and adds an engine-side backstop that runs per-execution READ ONLY transactions; the added tests note that the READ ONLY transaction reliably blocks DML while stacked DDL payloads are expected to be rejected upstream by the corrected classifier. PostgreSQL is not affected by this path because its '--' parsing agrees with the checker and its connector executes individually split statements; the Oracle, SQL Server and SQLite connectors are not reached by this path.
Know when Dbhub gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AC:H and UI:R because read-only mode must be in use on a MySQL/MariaDB connector and the assistant must process attacker-influenced SQL; PR:N as no auth is needed; C:N but I:H/A:H for writes and destructive DDL.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Unauthenticated MCP tool invocation in DBHub versions prior to 0.22.5 allows a malicious website to reach the HTTP trans
DBHub's `readonly = true` option on its `execute_sql` tool fails to enforce read-only database access in versions prior
EUVD-2026-114181
GHSA-j55q-p8qc-f6wg
NVD
CVE.org
EPSS
Exploit-DB