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.
- Reads: yes
- Writes: yes
- Deletes: yes
- Runs code: no
- Network: no
- Sends: no
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.
| Tool | What it can do | Notes |
|---|---|---|
execute_sql | Reads, Writes, Deletes | Runs SQL. With only --dsn, it can write per the README. |
search_objects | Reads | Schema 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.
| Credential | What it is for | Least privilege |
|---|---|---|
Database DSN or TOML config | Connection 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.
| Advisory | Severity | Summary | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-j656-3hf2-fvjc · CVE-2026-61789 | High | Read-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.6 | 0.22.6 |
| GHSA-mwwr-p57h-56pf · CVE-2026-61788 | High | Read-only mode does not prevent database writes | < 0.22.6 | 0.22.6 |
| GHSA-fm8p-53ww-hf6w · CVE-2026-61742 | High | DBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution | <= 0.22.4 | 0.22.5 |
What stands out
- README: read-only mode is a guardrail, not a permission boundary.
- The README says the old server only ran read-only queries. With
--dsnalone,execute_sqlcan also write. - GitHub lists 3 high-severity advisories: two about read-only mode being bypassed (one specific to the MySQL and MariaDB connectors), fixed in 0.22.6, and one DNS rebinding issue on the HTTP transport, fixed in 0.22.5.
Safe-install checklist
Install command from the project's docs: npx @bytebase/dbhub --dsn postgres://user:pass@host:5432/db.
- 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. - 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.
- Use a read-only database user. Do not rely on
readonly = truealone. - Set row limits and query timeouts in the TOML config and run a release newer than 0.22.6.
- Deny the tools you do not need. In Claude Code, deny rules in
.claude/settings.jsonuse the formmcp__<server name>__<tool>, where the server name is whatever you called it in your config. Example, if you named itdbhub:{ "permissions": { "deny": [ "mcp__dbhub__execute_sql" ] } } - Snapshot the tool list. Save the
tools/listoutput 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. - 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.
