CVE-2026-61788
Received Received - Intake

DBHub Remote Code Execution via Misconfigured Read-Only Mode

Vulnerability report for CVE-2026-61788, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-24

Last updated on: 2026-09-24

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-24
Last Modified
2026-09-24
Generated
2026-09-24
AI Q&A
2026-09-24
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
dbhub dbhub to 0.22.6 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-636 When the product encounters an error condition or failure, its design requires it to fall back to a state that is less secure than other options that are available, such as selecting the weakest encryption algorithm or using the most permissive access control restrictions.
CWE-863 The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
CWE-184 The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

DBHub is a database MCP server that supports multiple database systems. Prior to version 0.22.6, the readonly setting for the execute_sql tool did not function correctly. The intended read-only protection was bypassed due to a missing configuration value, allowing write operations and side effects through SELECT statements. This flaw enabled sequence tampering, file access, and remote code execution depending on user privileges.

Detection Guidance

Check if DBHub is running version 0.22.6 or later. Inspect the configuration file for the `execute_sql` tool to ensure `readonly = true` is set and properly enforced. Monitor network traffic for unauthenticated HTTP requests to `/mcp` on port 0.0.0.0.

Impact Analysis

If you use DBHub versions before 0.22.6, an attacker could exploit this to modify database sequences, read or write arbitrary files on the server, or execute remote code. The HTTP transport is unauthenticated and exposed to all network users, making this attack possible without authentication.

Compliance Impact

This vulnerability could lead to unauthorized data access, modification, or exfiltration, violating GDPR's integrity and confidentiality principles and HIPAA's security requirements for protected health information. Compliance failures may result in legal penalties and reputational damage.

Mitigation Strategies

Upgrade DBHub to version 0.22.6 or later. Disable unauthenticated HTTP access to `/mcp` or restrict it to trusted networks. Review and restrict database roles to limit privileges, especially for sequence tampering and file operations.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-61788. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart