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

> Attackers can bypass read-only restrictions in DBHub to execute arbitrary code or access sensitive data via unauthenticated network requests.

- **Severity:** High 7.4 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Sep 2026
- **Updated:** 29 Sep 2026
- **Also known as:** GHSA-mwwr-p57h-56pf

## What is CVE-2026-61788?

CVE-2026-61788 is a high-severity vulnerability in bytebase dbhub, published on 24 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-863 (Incorrect Authorization), CWE-636 (Not Failing Securely), CWE-184 (Incomplete List of Disallowed Inputs)

## Which versions are affected by CVE-2026-61788?

2 open source packages ship an affected version, including @bytebase/dbhub.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@bytebase/dbhub` | npm | All versions | 0.22.6 |
| `@bytebase/dbhub` | npm | All versions | 0.22.6 |

## How do I fix CVE-2026-61788?

Upgrade @bytebase/dbhub to 0.22.6 or later.

## Is CVE-2026-61788 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-61788 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-61788 and fix it if it is affected.

What it is: CVE-2026-61788 is a high-severity vulnerability in bytebase dbhub, published on 24 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-61788 exists.

Affected packages and fixed versions:
- @bytebase/dbhub (npm): affected all versions; fixed in 0.22.6
- @bytebase/dbhub (npm): affected all versions; fixed in 0.22.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-61788/ (Markdown: https://insights.sbomify.com/CVE-2026-61788/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-61788
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-61788
- OSV: https://osv.dev/vulnerability/CVE-2026-61788

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-61788/
Summaries are generated and may contain mistakes; the official description above is the record.
