Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-61788— @bytebase/dbhub's read-only mode does not prevent database writes

Quick assessment

Affected
bytebase dbhub
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

DBHub 是一个支持 PostgreSQL、MySQL、SQL Server、Oracle、MariaDB 和 SQLite 等数据库的 MCP(Model Context Protocol)服务器。在版本 0.22.6 之前,即使将 工具的 参数设置为 ,也无法使数据库连接真正变为只读状态。 尽管连接器代码旨在设置 PostgreSQL 的 (并将 SQLite 以只读模式打开),但这段逻辑被一个配置值所控制,而该配置值从未被正确填充,导致相关代码从未执行。因此,唯一剩余的只读保护机制是一个基于分类器的简单检查

CVSS 7.4 · High EPSS 0.30% · P21
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-61788

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
@bytebase/dbhub's read-only mode does not prevent database writes
Source: CVE Program / CVE List V5
Vulnerability Description
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Prior to version 0.22.6, setting `readonly = true` on the `execute_sql` tool does not make the connection read-only. The connectors are written to set PostgreSQL `default_transaction_read_only=on` (and open SQLite in `readOnly` mode), but that code is gated on a config value that is never populated, so it never runs. The only thing left enforcing read-only is a classifier that inspects the first keyword of each statement. Any `SELECT` that writes or has side effects through a function call passes it. With an ordinary role this allows sequence tampering; with a privileged role it allows writing arbitrary files on the server (`lo_export`), reading arbitrary host files (`pg_read_file`), and remote code execution (`dblink` + `COPY ... TO PROGRAM`). The HTTP transport is unauthenticated and binds to `0.0.0.0` by default, so this is reachable by any network caller of `/mcp`. Version 0.22.6 patches the issue.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
不完整的黑名单
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
bytebase dbhub < 0.22.6 -

II. Public POCs for CVE-2026-61788

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-61788

请登录查看更多情报信息。

Other References for CVE-2026-61788 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-61788

No comments yet


Leave a comment