Last updated November 27, 2026. Lab used @bytebase/dbhub 1.6.1, 1.7.0, and 2.1.0 (the newest npm release on November 27, 2026) with PostgreSQL 17.12 on Linux.
Bytebase DBHub, an open source MCP server that gives AI agents SQL access, has an unpatched authentication bypass: Trend Micro’s Zero Day Initiative published CVE-2026-136441 (ZDI-26-1067, CVSS 9.8) on November 24, 2026 as a 0-day with no fixed version. A separate read-only bypass, CVE-2026-134803, is fixed in DBHub 1.7.0.
We ran three DBHub builds against a throwaway PostgreSQL database to see what each one allows. DBHub 1.6.1 let a read-only execute_sql call delete a row and create a table. Versions 1.7.0 and 2.1.0 blocked every hidden write we sent. All three listened on every network interface and answered SQL with no credentials unless we passed --auth-token.
This report builds on our database MCP servers comparison, where DBHub ranked as the lightest option, and our MCP security tools guide. No vendor paid for this page.
TL;DR
- ZDI published CVE-2026-136441 on November 24, 2026: an unauthenticated authentication bypass in DBHub’s MCP server, CVSS 9.8, reported to Bytebase on July 18, 2025 and released with no patch.
- CVE-2026-134803 (GitHub Advisory Database, November 23) let read-only callers hide COMMIT and write statements behind backslash-escaped quotes. DBHub 1.7.0, released November 16, fixes it.
- In our lab, DBHub 1.6.1 ran a hidden DELETE and a hidden CREATE TABLE in read-only mode. DBHub 1.7.0 and 2.1.0 blocked both.
- DBHub 1.6.1, 1.7.0, and 2.1.0 bind the HTTP transport to 0.0.0.0 by default and answered an unauthenticated SELECT on the machine’s network address.
- Run DBHub over stdio, or over HTTP with
--host 127.0.0.1and--auth-token, and give it a database role that cannot write.
What ZDI and GitHub Published
Two DBHub advisories landed in the same week. ZDI-26-1067 says the flaw “exists within the implementation of the MCP server” and results from “an incorrect authorization decision when parsing untrusted SQL,” letting a remote attacker bypass authentication without credentials. ZDI’s only mitigation is to restrict interaction with the product.
The ZDI timeline shows researchers Alfredo Oliveira and David Fiser of Trend Research reported the bug on July 18, 2025. ZDI asked Bytebase for updates on October 29 and December 10, 2025, then told the vendor on November 9, 2026 that it would publish as a 0-day. The CVE record lists no affected version range and no fix, and OpenAdvisories pins the affected code to commit 16e870ba.
The second advisory, CVE-2026-134803, describes a read-only bypass in DBHub releases before 1.7.0, scored 7.2 under CVSS 4.0 by VulnCheck. Its fix is pull request #505, merged on November 12, 2026, which taught DBHub’s SQL scanner that MySQL strings and PostgreSQL E'...' strings can contain backslash-escaped quotes.

This is DBHub’s fifth security advisory of 2026. Three June advisories covered a DNS rebinding hole in the HTTP transport (CVE-2026-61742), a readonly = true setting that never made the connection read-only (CVE-2026-61788), and a MySQL comment mismatch that hid writes (CVE-2026-61789).
How Does the DBHub Read-Only Bypass Work?
DBHub decides whether a query is read-only by scanning the SQL text, and before 1.7.0 its scanner ended every quoted string at the first quote that was not doubled. PostgreSQL E'...' strings and MySQL strings also treat a backslash before a quote as part of the string, so the two disagreed about where the string ended.
An attacker uses that gap to hide statements. The scanner sees one long string inside a single SELECT, while the database sees a short string followed by COMMIT, SET transaction_read_only = off, and any write. The COMMIT ends the read-only transaction DBHub opened, and the SET clears read-only mode for the next one.
PR #505 added backslash-aware scanning and checks MySQL queries under three sql_mode readings, keeping the strictest result. The PR author’s differential fuzz against the sqlglot tokenizer found 89 hidden DROP statements allowed on MySQL inputs and 20 on PostgreSQL inputs before the fix, and none after.
The PR states one known limit: PostgreSQL servers running with standard_conforming_strings = off still treat backslashes as escapes in plain strings, and 1.7.0 does not handle that. The setting has defaulted to on since PostgreSQL 9.1. DBHub 2.1.0, released November 21, classifies PostgreSQL SQL with libpg-query, the parser extracted from PostgreSQL itself.
What We Tested in Our DBHub Lab
We tested DBHub 1.6.1, 1.7.0, and 2.1.0 over the HTTP transport against PostgreSQL 17.12, with execute_sql set to readonly = true in TOML. In 1.6.1, a write hidden behind a backslash-escaped quote deleted a row and created a table. In 1.7.0 and 2.1.0, every hidden write was refused.
Each build connected as the database owner to a five-row accounts table, which we reset before every payload. We sent four queries per build: a plain DELETE, a stacked SELECT and DELETE, and the hidden COMMIT pattern from the advisory followed by either a DELETE or a CREATE TABLE.

- Read-only bypass. All three builds blocked the plain DELETE and the stacked query. Only 1.6.1 ran the hidden payloads: the table dropped from 5 rows to 4, and a new table appeared. DBHub 1.6.1 returned
success: truewith an empty result, so an agent log would show a harmless SELECT. - Listening address. With
--transport httpand no--hostflag, all three builds bound to 0.0.0.0. The source code sets that default inresolveHost. - No credentials by default. All three builds accepted an MCP initialize call and a SELECT sent to the machine’s own network address, 172.30.0.2 in our lab, with no Authorization header. DBHub adds the machine’s own hostname and addresses to its allowed hosts, and every startup log said “Auth: disabled” in that mode.
- Browser protections held. All three builds returned 403 for a request with a foreign Origin header and for a Host header naming an outside domain, the fix for the June DNS rebinding advisory.
- Token mode works. DBHub 2.1.0 started with
--auth-tokenreturned 401 to every request without the bearer token and served normally with it.
Our lab did not reproduce CVE-2026-136441 itself. ZDI has not published technical details, so we cannot say whether 1.7.0’s parser fix or 2.1.0’s libpg-query classifier closes it. Treat any DBHub HTTP endpoint that a client can reach without a token as an open SQL console for whatever role DBHub logs in with.
Is DBHub Safe to Use Right Now?
DBHub is reasonable for local, single-user agent work over stdio with a read-only database role, as of November 27, 2026. It is not safe as a shared HTTP service on a network until Bytebase ships a fix for CVE-2026-136441, unless a token and a network boundary sit in front of it.
- Choose DBHub over stdio when one developer connects Claude Code, Cursor, or another local client to a database. Stdio has no network listener, so a remote caller has nothing to reach.
- Choose DBHub over HTTP with a token when several agents share one server. Pass
--host 127.0.0.1or a private address, set--auth-token, and put it behind a gateway or VPN. - Choose neither when the only credentials you can give DBHub can write to production data. Read-only mode is a text check that has been bypassed three times this year, and a database role without write grants is the control that holds.
Teams that need audit trails and per-user policy on top of database tools can route DBHub through one of the MCP gateways we compared. Several of them add authentication, logging, and tool allowlists in front of any MCP server.
How to Harden a DBHub Deployment Today
Upgrade to DBHub 1.7.0 or later to close CVE-2026-134803, then reduce what an unauthenticated caller can reach. The steps below apply to anyone running DBHub as of November 27, 2026, and they still apply after Bytebase patches the ZDI bug, because they limit damage from the next parser flaw.
- Check the DBHub version pinned in your MCP client config or lockfile, and upgrade anything older than 1.7.0. We tested 2.1.0, the current release.
- Prefer
--transport stdiofor local clients. For HTTP, always pass--host 127.0.0.1(or a private interface) and--auth-tokenwith a long random value. - Create a database role with SELECT grants only, and connect DBHub with it. Our earlier database MCP server tests found that a read-only role blocked writes even where the server itself let them through.
- Keep
readonly = trueonexecute_sqlas a second layer, and setmax_rowsto cap result size. - Firewall the DBHub port from anything that is not an agent host, and log requests at a gateway so you can spot an unexpected client.
# dbhub.toml
[[sources]]
id = "app"
dsn = "postgres://agent_ro:CHANGE_ME@db.internal:5432/app?sslmode=require"
[[tools]]
name = "execute_sql"
source = "app"
readonly = true
max_rows = 500
# HTTP only when several agents share the server:
# npx @bytebase/dbhub@2.1.0 --transport http --host 127.0.0.1 --port 8080 \
# --auth-token "$(openssl rand -hex 32)" --config dbhub.toml
What This Means for Agent Database Access
Text-based read-only checks keep failing because SQL dialects disagree on comments, quotes, and escapes. Four of DBHub’s five advisories in 2026 involve its SQL checks, two of them from the scanner reading SQL differently than the database did, and each fix closed one gap at a time.
Moving to the database’s own parser, as DBHub 2.1.0 did for PostgreSQL with libpg-query, removes one class of mismatch, but a real parser still runs in front of credentials that can write. The durable pattern is to let the database refuse the write. That means a read-only role, a read replica, or a security layer that inspects MCP tool calls before they reach the server.
The default 0.0.0.0 bind is the other lesson. Ruflo’s MCP bridge flaw, CVE-2026-59726, also came from an unauthenticated HTTP endpoint on all interfaces, and its fix moved the default to loopback. DBHub has a token flag and host checks, but as of 2.1.0 its HTTP default still listens on every interface with authentication off.
Frequently Asked Questions
Is DBHub patched against CVE-2026-136441?
No. As of November 27, 2026, no DBHub release lists a fix for CVE-2026-136441, and ZDI published it as a 0-day on November 24. ZDI’s only advice is to restrict interaction with the product, so keep DBHub on stdio or behind a token and a private network until Bytebase ships a patch.
Which DBHub version fixes the read-only bypass?
DBHub 1.7.0, released November 16, 2026, fixes CVE-2026-134803 by honoring backslash-escaped quotes in MySQL strings and PostgreSQL E strings. In our lab, 1.6.1 ran a hidden DELETE in read-only mode while 1.7.0 and 2.1.0 refused it. Upgrade to 2.1.0, the current release, if you can.
Does DBHub require authentication over HTTP?
Not by default. DBHub 1.6.1, 1.7.0, and 2.1.0 started with the HTTP transport bound to 0.0.0.0 and answered SQL without credentials in our lab. Passing –auth-token or setting DBHUB_AUTH_TOKEN made 2.1.0 return 401 to every request that lacked the bearer token.
Is DBHub over stdio affected by these vulnerabilities?
Stdio removes the network listener, so a remote attacker cannot reach DBHub directly. A prompt-injected agent can still send a crafted query through execute_sql, which is how the read-only bypass would be used locally. Upgrade to 1.7.0 or later and connect with a database role that cannot write.
What should I do if DBHub was exposed on a network?
Bind it to loopback or add –auth-token now, upgrade to 2.1.0, and rotate the database password DBHub used. Then review database logs for writes, DDL, or COMMIT statements from DBHub’s role, and check for new tables or changed rows since the server was first exposed.
Related Guides
DBHub was not the only MCP server patched that week. Our MCP servers v2.6.0 lab covers eight fixes in the official git, memory and fetch servers.
- Best database MCP servers
- Best MCP servers
- MCP security tools
- MCP gateways compared
- MCP Python SDK session vulnerability
- ContextForge MCP gateway SSRF
Sources
- Zero Day Initiative: ZDI-26-1067, Bytebase DBHub MCP Incorrect Authorization Authentication Bypass (Nov 24, 2026)
- GitHub Advisory Database: CVE-2026-136441 (GHSA-hvw4-mh2q-3vph)
- GitHub Advisory Database: CVE-2026-134803, DBHub read-only mode bypass (GHSA-p6h8-6r97-q9rf)
- bytebase/dbhub pull request #505: honor backslash-escaped quotes in MySQL strings and PostgreSQL E strings
- bytebase/dbhub releases (1.7.0, 2.1.0)
- GitHub Advisory Database: CVE-2026-61742, DBHub HTTP transport DNS rebinding
- OpenAdvisories: CVE-2026-136441
- The Injection: DBHub, an unauthenticated MCP caller gets past the database gate (Nov 24, 2026)

