Skip to main content
VulnerabilityPublished

@bytebase/dbhub · DBHub: MySQL and MariaDB comment interpretation bypasses read-only SQL validation

Affects @bytebase/dbhubSource GCVE Database

0

CVSS 6.1 Medium : upgrade to 0.22.6 when convenient.

Data as of 2 Nov 2026, 19:43 UTC

CVSS 4.0 base score
6.1Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.22.6
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

What to do

Upgrade @bytebase/dbhub to 0.22.6.

Affected software

ProductAffectedFixed in
npm@bytebase/dbhubAffected
  • <0.22.6
Fixed in
  • 0.22.6

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in DBHub version 0.22.6 that fixes this vulnerability. The fix involves executing only the validated SQL statements rather than the original unmodified input and disabling the multipleStatements option on MySQL and MariaDB connectors unless explicitly required. Additionally, the comment parsing logic is updated to be dialect-aware, requiring whitespace or control characters after "--" to recognize comments correctly. Users should upgrade to version 0.22.6 or later to remediate this issue.

Description

A vulnerability in DBHub's MySQL and MariaDB connectors allows bypass of read-only SQL validation due to incorrect handling of single-line comments. The DBHub SQL parser treats any "--" as a comment start regardless of the following character, whereas MySQL and MariaDB require whitespace or control characters after "--" to start a comment. This mismatch enables execution of arbitrary write and DDL statements in read-only mode, such as DROP TABLE. The issue affects DBHub versions prior to 0.22.6 and is fixed in 0.22.6.

References

Community reviews

Loading reviews…