Published:

Read-only is not a lock: flaws in database MCP servers DBHub, WhoDB and Bagel, one with no confirmed fix

In short: on November 24, 2026, ZDI published a critical DBHub flaw (CVE-2026-136441, CVSS 9.8) with no confirmed fix. Other CVEs that week affect DBHub's read-only mode and the SQL checks in WhoDB and Bagel. An MCP server's read-only mode is a guardrail; the database account determines the real permissions.

A database MCP server lets an AI assistant run SQL queries, for example to answer questions about customers or revenue. Read-only mode is an obvious safeguard. Bytebase's DBHub is one such server. Its npm package was downloaded 150,632 times from November 23 through 29. That includes automated installs.

What is going on with DBHub?

There are two separate flaws:

Is the latest DBHub affected by the critical flaw? That has not been publicly established. The CVE record names only a commit from June 5, 2025, when the package was at version 0.4.11. The status of other versions is "unknown". There are 576 commits between that one and version 2.1.0 (November 21, 2026). DBHub added enforcement by the database itself in 0.22.6, and version 2.1.0 uses a real SQL parser for PostgreSQL. Neither is a confirmed fix for this CVE. On November 30, CISA's assessment of the CVE recorded no known exploitation, but did rate exploitation as automatable.

Why does read-only keep failing?

The check must predict what a database will do with SQL. Other servers got this wrong too:

The problem is not new. In August 2025, Datadog described a bypass of the read-only restriction in Anthropic's former reference Postgres server. That npm package is marked as archived, unmaintained and without security guarantees. It still had 112,546 downloads from November 23 through 29. DBHub itself had already received two advisories about its read-only mode in June 2026.

DBHub's documentation is now clear on this point: the mode is a guardrail against unintended writes, not a permission boundary. Some database functions can use files or network connections from an ordinary SELECT. A read-only transaction does not stop that; database privileges do.

Our advice

(1) Isolate DBHub. Keep untrusted users and input away from the server, and disable connections to sensitive data if you can't. In HTTP mode, DBHub listens on all network interfaces by default (0.0.0.0). Limit it to 127.0.0.1 or use a firewall, and set --auth-token. This reduces exposure but is not a confirmed fix. (2) Update anyway: DBHub to at least 1.7.0, WhoDB to 0.134.0 and bagel-mcp to 2.5.5. Replace the archived Postgres server. (3) Set permissions in the database. Create a separate non-admin account for each connection, with read access only to the tables or views it needs. Grant no privileges for file access on the server. (4) Prefer a replica or reporting database with as little personal data as possible. Read-only does not prevent a data leak: anything the account can read can reach the assistant. (5) Test the account itself. In a test environment, try to write without going through the MCP server. The database should refuse. More in MCP security.

What does this mean when you choose a database MCP server?

Don't just ask whether there is a read-only mode; ask what enforces it. A filter in the MCP server is the weakest option, especially if it relies on a list of forbidden words. A transaction the database treats as read-only is a stronger extra layer, but CVE-2026-134803 shows that this could be switched off too. Limited account privileges are the foundation. If you build your own server, offer fixed queries with parameters rather than free-form SQL, and reject anything the check doesn't recognize. See build an MCP server and our data & analytics overview.

The bigger picture: labels such as "read-only" describe an intention; they are not a guarantee. We saw the same with the official Git server. It received another high-severity advisory on November 27: with Git LFS installed, the read tool git_status could still start a program named in the repository's configuration. The patched version is now 2026.11.27. So limit the privileges of the account and process behind a tool.

Sources

Frequently asked questions

Is there a patch for CVE-2026-136441 in DBHub?

None is confirmed as of December 1, 2026. ZDI lists no fixed version and only advises restricting interaction with the product. The CVE record names one affected commit, from June 2025, and marks other versions as 'unknown'. Version 1.7.0 fixes a different flaw: CVE-2026-134803.

Is an MCP server's read-only mode pointless, then?

No. It helps against an AI assistant's mistakes and is a useful extra layer. But it does not replace database privileges. DBHub's own documentation calls the mode a guardrail, not a permission boundary.

Which WhoDB version fixes these flaws?

Use 0.134.0 or later. The CVE record lists versions before 0.132.0 as affected, but both maintainer advisories give 0.134.0 as the patched version. The 0.134.0 release notes list the fixes too.

Last updated: