PTS security notes / MCP servers / DBHub

Is DBHub safe to install?

By PTS · Based on public source as of December 5, 2026

Short answer

Its execute_sql can write unless you configure read-only mode. The README says read-only mode is a guardrail, not a permission boundary, and tells you to use a read-only database user. GitHub lists 3 high-severity advisories, fixed by 0.22.6. Use a read-only DB user, set readonly = true, and run a current version.

What it is

DBHub is an open-source, multi-database MCP server from Bytebase. It connects to PostgreSQL, MySQL, MariaDB, SQL Server and SQLite, and offers SQL execution and schema search tools with row limits and timeouts.

Maintainer
Official (vendor)bytebase on GitHub (organisation account, project of the same name)
Source
bytebase/dbhub4,072 GitHub stars · MIT licence
Transport
stdio, HTTP (optional)
Packages
@bytebase/dbhub npm · latest 2.1.0 · 829,686 downloads last month
Latest release
v2.1.0 2026-11-21
Public advisories
3GitHub and OSV, as of December 5, 2026

What it can do

Read from the public tool definitions in the source, not from a live run. A capability marked "yes" means at least one tool can do it.

It can modify data if the database user can, unless readonly = true is set, and the README says even that is not a permission boundary.

ToolWhat it can doNotes
execute_sqlReads, Writes, DeletesRuns SQL. With only --dsn, it can write per the README.
search_objectsReadsSchema and object search.

Tool names come from the project's docs and config. Source defines them through a tool configuration object.

Credentials and least privilege

The database user decides what is possible, even more than DBHub's own mode.

CredentialWhat it is forLeast privilege
Database DSN or TOML configConnection string(s) for your databases.Use a dedicated read-only database user on a replica if possible. Keep the DSN out of shell history and shared config.

Public security advisories

Advisories published on GitHub or OSV for this project, as of December 5, 2026. Fixed issues are a normal part of a maintained project. What matters is that the version you run is not in an affected range.

AdvisorySeveritySummaryAffectedFixed in
GHSA-j656-3hf2-fvjc · CVE-2026-61789HighRead-only mode can be bypassed on the MySQL and MariaDB connectors, allowing arbitrary writes and DDL (for example DROP TABLE) through a query that passes the read-only check. DBHub treats "--" as a comment regardless of the next character, but MySQL and MariaDB only start a "--" comment when it is followed by whitespace, so a statement hidden after "--" is ignored by the read-only check yet executed by the database. The MySQL/MariaDB connectors run with multipleStatements enabled and execute the original query string.< 0.22.60.22.6
GHSA-mwwr-p57h-56pf · CVE-2026-61788HighRead-only mode does not prevent database writes< 0.22.60.22.6
GHSA-fm8p-53ww-hf6w · CVE-2026-61742HighDBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution<= 0.22.40.22.5

What stands out

Safe-install checklist

Install command from the project's docs: npx @bytebase/dbhub --dsn postgres://user:pass@host:5432/db.

  1. Pin the version. Use an exact version, not latest: npx @bytebase/dbhub@2.1.0 --config dbhub.toml. Use a TOML config with readonly = true rather than a DSN with a write user.
  2. Scope the credential. Use a dedicated read-only database user on a replica if possible. Keep the DSN out of shell history and shared config.
  3. Use a read-only database user. Do not rely on readonly = true alone.
  4. Set row limits and query timeouts in the TOML config and run a release newer than 0.22.6.
  5. Deny the tools you do not need. In Claude Code, deny rules in .claude/settings.json use the form mcp__<server name>__<tool>, where the server name is whatever you called it in your config. Example, if you named it dbhub:
    {
      "permissions": {
        "deny": [
          "mcp__dbhub__execute_sql"
        ]
      }
    }
  6. Snapshot the tool list. Save the tools/list output right after you install, then compare it before every upgrade with the free PTS MCP tool diff checker. It runs in your browser and flags new tools and changed descriptions or schemas.
  7. Watch for fixes. Watch the project's security advisories and upgrade on purpose, after the diff.

For the general version of this list, see the MCP server security checklist. Not sure about a server that is not listed here? Read Is an MCP server safe to install?

Quick follow-ups

What can DBHub do on my machine or accounts?

Based on its public tool definitions, it can: reads local files or data; creates or changes files, records or settings; deletes or destroys data. It can modify data if the database user can, unless `readonly = true` is set, and the README says even that is not a permission boundary.

Does DBHub need a token or API key?

Yes, depending on setup: Database DSN or TOML config. The database user decides what is possible, even more than DBHub's own mode.

Has DBHub had public security advisories?

Yes. 3 public advisories (GitHub or OSV) listed for it as of December 5, 2026. Each one is linked on this page with its affected and fixed versions, so you can check the version you run. Fixed issues are normal for active projects. Running a current, pinned version is what matters.

How do I keep DBHub from changing under me?

Pin the version, for example npx @bytebase/dbhub@2.1.0 --config dbhub.toml. Then save its tool list (name, description, input schema) with the free PTS MCP tool diff checker and compare it before each upgrade.

Sources

This page is a factual summary of public information about the software. It is not a verdict on the maintainers and not an audit. Check the project's own docs for your version before you rely on it. Educational, not legal or security advice.

Get the free checklist

A 9-page worksheet plus starter files for Claude Code and Codex. It maps what your agent can reach and shrinks it. Download it on Gumroad. This site does not collect email.

Get the free checklist

Before you install anything, try the MCP tool diff checker. See all 54 servers.

More server pages