# CVE-2026-61789: DBHub: MySQL and MariaDB comment interpretation bypasses read-only SQL validation

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Passive; Confidentiality impact: None; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.53% (percentile 38, 2026-11-26)
- **CWE:** CWE-436, CWE-863
- **Aliases:** GHSA-j656-3hf2-fvjc
- **Published:** 2026-10-30T16:08:24.224Z
- **Modified:** 2026-11-06T17:18:32.840Z

## Who should check

- Projects that depend on npm package @bytebase/dbhub (\< 0.22.6)
- Anyone running bytebase dbhub \< 0.22.6

## Description

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.

## Affected and fixed versions

- npm `@bytebase/dbhub`: affected \< 0.22.6; fixed 0.22.6 (osv)
- bytebase dbhub: \< 0.22.6 (cvelist)

## Mitigation

- Upgrade @bytebase/dbhub to 0.22.6 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-61789. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-61789.md
Affected: @bytebase/dbhub < 0.22.6
Fixed in: 0.22.6

Steps:
1. Search this machine and project for @bytebase/dbhub (npm), bytebase dbhub: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-61789 being exploited?

There is no confirmed exploitation: CVE-2026-61789 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.53% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-61789?

Medium: CVSS 6.1 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-61789?

@bytebase/dbhub \< 0.22.6.

### Is there a fix for CVE-2026-61789?

Yes. Fixed in 0.22.6. Upgrade @bytebase/dbhub to 0.22.6 or later.

### How do I check if I'm affected by CVE-2026-61789?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/bytebase/dbhub/security/advisories/GHSA-j656-3hf2-fvjc>
- patch: <https://github.com/bytebase/dbhub/pull/342>
- patch: <https://github.com/bytebase/dbhub/commit/872bb338f7d31f6afe517a076ac3e3edafaaaf08>
- other: <https://github.com/bytebase/dbhub/releases/tag/v0.22.6>
- other: <https://github.com/bytebase/dbhub>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-61789>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-j656-3hf2-fvjc> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-61789> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-61789>
