CVE-2026-134803: DBHub MCP server's read-only mode could be bypassed with backslash-escaped quotes, hiding SET transaction_read_only, COMMIT and DROP statements inside a string on MySQL, MariaDB and PostgreSQL (fixed 1.7.0)
DBHub, Bytebase's database MCP server, can restrict execute_sql to read-only statements. Before 1.7.0 its SQL scanner ended every quoted string at the first quote that was not doubled, but MySQL and MariaDB strings (and PostgreSQL E'...' strings) also treat a backslash-escaped quote as part of the string. A query such as SELECT '\' , '; SET SESSION transaction_read_only = 0; COMMIT; DROP TABLE t; SELECT '' looked like one SELECT to the read-only check but ran as five statements on the server. Anyone who can steer the agent's SQL, including through prompt injection, could change or drop data. This is a different bug from the earlier double-dash comment bypass (CVE-2026-61789). Fixed in 1.7.0.
What it is
Root cause: scanSingleQuotedString in src/utils/sql-parser.ts did not honour backslash escapes (PR #505, fixes issue #504).
The fix scans MySQL/MariaDB SQL under three readings (server default with backslash escapes, NO_BACKSLASH_ESCAPES, ANSI_QUOTES) and denies the query if any reading shows a non-read statement; PostgreSQL E'...' strings are now scanned with backslash escapes, and explain_sql must be a single statement under every reading.
DBHub v1.7.0 was released on 16 November 2026; NVD published the CVE (CNA VulnCheck) on 22 November 2026.
How to check
- Check your DBHub version (npx @bytebase/dbhub --version or the version pinned in your MCP config); anything before 1.7.0 relying on read-only mode is affected.
- Look in database logs for queries from the DBHub user containing \' together with SET SESSION, COMMIT or DDL.
How to fix
- Upgrade DBHub to 1.7.0 or later.
- Don't rely on the MCP server's SQL parsing alone: connect it with a database user that only has SELECT rights (or a read replica).
- Treat agent-generated SQL as untrusted whenever the agent reads external content.
-- MySQL/MariaDB: give the MCP server a user that can only read
CREATE USER 'dbhub_ro'@'%' IDENTIFIED BY '...';
GRANT SELECT ON app.* TO 'dbhub_ro'@'%'; Sources
- criticalCVE-2026-115555 and 28 more: IBM's Langflow bulletin fixes 29 flaws up to 1.13.0, including 9.9 code execution, MCP tool calls that run custom code without admin rights and an unauthenticated public-flow RCE, upgrade to 1.13.1
- criticalCVE-2026-76092 and CVE-2026-76099: Docker MCP Gateway served its MCP endpoints with no auth in container mode, and its dynamic tools could mount the Docker socket for root on the host (fixed 0.43.1)
- criticalCVE-2026-142487: Joinly's meeting-agent MCP server let any network client import and run subprocess.Popen through the joinly-settings header (fixed 0.5.4)
- criticalCVE-2026-76812 and more: CKAN MCP Server's unauthenticated HTTP mode let anyone bounce sparql_query to the cloud metadata service and read IAM credentials, plus a string of SSRF, injection and DoS fixes (upgrade to 0.4.147)