← All advisories

CVE-2026-134803highBroken access control2026-11-22

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.

01.

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.

02.

How to check

  1. 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.
  2. Look in database logs for queries from the DBHub user containing \' together with SET SESSION, COMMIT or DDL.
03.

How to fix

  1. Upgrade DBHub to 1.7.0 or later.
  2. 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).
  3. 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'@'%';
04.

Sources

Related on VibeVulns
More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.