Skip to main content

DBHub CVE-2026-61788

| EUVDEUVD-2026-86326 HIGH
Incomplete List of Disallowed Inputs (CWE-184)
2026-09-24 GitHub_M GHSA-mwwr-p57h-56pf
7.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach unauthenticated /mcp on 0.0.0.0
  2. Delivery
    Call execute_sql assuming enforced read-only
  3. Exploit
    Submit SELECT wrapping side-effect function
  4. Execution
    Invoke dblink + COPY TO PROGRAM as privileged role
  5. Impact
    Achieve RCE and host file read/write

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
Exploitation Conditions

Requires DBHub to be run with the HTTP transport, which is unauthenticated and binds to 0.0.0.0 by default, exposing /mcp to any network caller. Basic exploitation (bypassing the readonly=true setting on execute_sql via a SELECT that calls a side-effecting function) works against any connected database because the read-only connector enforcement is dead code gated on an unpopulated config value, leaving only a first-keyword classifier. The high-impact outcomes are conditional on the database connection role: an ordinary role permits only limited sequence tampering, whereas a privileged PostgreSQL role is required for arbitrary host file write (lo_export), arbitrary host file read (pg_read_file), and remote code execution (dblink + COPY ... TO PROGRAM). Limiting factors: the worst impacts depend on a privileged DB role, and exposure depends on the operator choosing the HTTP transport rather than stdio; all versions before 0.22.6 are affected.

Impact

This is a genuine high-priority issue for anyone running DBHub's HTTP transport, though the raw CVSS 7.4 slightly understates the worst case while overstating the common case. The NVD vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N marks it network-reachable and unauthenticated (PR:N), consistent with the description's statement that the HTTP transport is unauthenticated and binds 0.0.0.0 by default, making /mcp reachable by any network caller. AC:H is defensible because the severe impacts (arbitrary host file read via pg_read_file, arbitrary file write via lo_export, and RCE via dblink + COPY ... TO PROGRAM) require the DBHub connection to run under a privileged database role; with only an ordinary role, impact drops to limited sequence tampering (I:L). I dispute A:N - COPY ... TO PROGRAM yields command execution on the database host, which should carry availability impact (A:H), and one could argue S:C since the executing/impacted component (the DB server host) differs from the vulnerable MCP component. No EPSS score, no CISA KEV listing, and no public POC were provided, so there is no evidence of active exploitation; this is a real, remotely-triggerable design flaw (broken read-only enforcement, CWE-184) rather than a confirmed campaign. Priority is driven by trivial network reachability of the default HTTP binding plus a full RCE path when a privileged DB role is in use - a common real-world configuration for a database tool.

Exploit ScenarioDerived

An attacker on the same network (or the internet, where the 0.0.0.0-bound HTTP transport is exposed) sends an MCP request to the unauthenticated /mcp endpoint calling execute_sql, which the operator believes is locked to read-only. They submit a SELECT that invokes a side-effecting function - e.g. dblink() with COPY ... TO PROGRAM - which the first-keyword classifier passes as 'read-only,' achieving arbitrary command execution on the database host when DBHub connects with a privileged role. No public exploit code was identified at time of analysis, but the technique is described concretely in the advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 public PoC Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 24, 2026

DBHub's readonly = true option on its execute_sql tool fails to enforce read-only database access in versions prior to 0.22.6, because the connector code that would set PostgreSQL default_transaction_read_only=on and open SQLite in read-only mode is gated on a configuration value that is never populated. With only a first-keyword classifier left as a guard, any SELECT that calls a side-effecting function passes, allowing sequence tampering with an ordinary role and, with a privileged PostgreSQL role, arbitrary host file write via lo_export, arbitrary host file read via pg_read_file, and remote code execution via dblink combined with COPY ... TO PROGRAM. The HTTP transport is unauthenticated (CVSS vector PR:N) and binds to 0.0.0.0 by default, so any network caller of /mcp can reach the vulnerable tool; CVSS is 7.4 (AV:N/AC:H) and no public exploit code has been identified at time of analysis, though the vendor-released patch 0.22.6 resolves the issue.

RemediationAI

Upgrade DBHub to 0.22.6, the vendor-released patch version, which fixes the read-only enforcement as documented in advisory GHSA-mwwr-p57h-56pf (https://github.com/bytebase/dbhub/security/advisories/GHSA-mwwr-p57h-56pf). Until upgrading, do not rely on readonly = true on execute_sql - it provides no real protection - and prefer the stdio transport over HTTP, since that removes the network-reachable attack surface entirely at the cost of only being usable by local MCP clients. If HTTP transport is required, restrict exposure by binding to loopback instead of 0.0.0.0 and firewall or reverse-proxy restricting access to /mcp, accepting that this merely reduces reachability and does not fix the bypass. Reduce blast radius by connecting with a least-privileged database role: avoid superusers and any role with pg_read_server_files/pg_write_server_files, revoke EXECUTE on dblink, and remove lo_export/pg_read_file/COPY ... TO PROGRAM capability where possible - these cuts prevent the file read/write and RCE outcomes but still leave sequence tampering possible, so they are compensating controls, not substitutes for the 0.22.6 upgrade.

Affected VersionsENISA

dbhub < 0.22.6

Affected Packages

npm @bytebase/dbhub fix: 0.22.6
euvd dbhub fix: 0.22.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

DBHub is a database MCP (Model Context Protocol) server that exposes database access as tools to MCP clients, supporting Postgres, MySQL, SQL Server, Oracle, MariaDB and SQLite through per-engine connectors. The intended read-only protection had two layers: connector-level enforcement (PostgreSQL default_transaction_read_only=on, SQLite opened with the readOnly flag) and a statement classifier. CWE-184 (Incomplete List of Disallowed Inputs) captures the root cause here: the connector-level enforcement is dead code because it is gated on a config value that is never populated, leaving only a check on the first keyword of each statement. That classifier can be trivially bypassed by a SELECT whose expression calls a function with side effects, since statement classification never inspects function semantics. The impact then depends entirely on the privileges of the configured database role: an unprivileged role limits an attacker to sequence manipulation, while a PostgreSQL role with elevated rights unlocks server-side primitives such as lo_export, pg_read_file, dblink and COPY ... TO PROGRAM. Exposure is governed by the transport choice: the HTTP transport is unauthenticated and listens on 0.0.0.0 by default, making /mcp reachable by any network caller, whereas stdio transport is not remotely reachable. The affected CPE covers the full bytebase:dbhub product line, i.e. all releases before 0.22.6.

Know when Dbhub gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 8.1 HIGH

Unauthenticated network reach to default 0.0.0.0 /mcp (PR:N, AV:N); AC:H because full C/I/A impact requires a privileged DB role; RCE via COPY TO PROGRAM justifies A:H over NVD's A:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Sep 24, 2026 - 19:04 EUVD
CVE Published
Sep 24, 2026 - 17:37 cve.org
HIGH 7.4

DescriptionCVE.org

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.

Technical POC Analysis

CWE-184 (incomplete list of disallowed inputs), with the advisory also mapping CWE-636 (failing open) and CWE-863 (incorrect authorization).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 public PoC link from github

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

DBHub versions prior to 0.22.6 fail to enforce read-only database access, allowing unauthenticated network attackers to tamper with data, read and write files on the host, and potentially execute remote code when privileged database roles are used. This HIGH severity vulnerability (CVSS 7.4) affects any organization exposing the DBHub /mcp endpoint, which binds to all network interfaces by default, and no public exploit identified at time of analysis. Leadership should prioritize immediate patching and network exposure reduction to mitigate the risk of data integrity loss, unauthorized file access, and full system compromise.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
niche but growing open-source database MCP server, limited production footprint
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

57
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +37
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy