Rightshold™ Sign up
Rightshold is live — the trust layer for AI agents.Launched November 23, 2026.Evidence Delivery$99 / 30 days · Offers are open — review the exact terms and the payment options shown on the service page before accepting.No token, everany ‘Rightshold token’ is not ours

Answers · MCP security

We connect Claude and Cursor to our MySQL and PostgreSQL databases through Bytebase's DBHub MCP server with execute_sql set to read-only. Two DBHub advisories came out in late November 2026. Could an agent or a prompt injection have written to or dropped our tables, which version fixes it, and is read-only mode enough on its own?

Last updated

TL;DR: Yes, before DBHub 1.7.0 a query could look like one harmless SELECT to DBHub's read-only check and still run writes on MySQL, MariaDB or PostgreSQL. CVE-2026-134803 (GHSA-p6h8-6r97-q9rf, published November 22, 2026, CVSS 4.0 score 7.2) says the SQL scanner ended a quoted string at the first quote that wasn't doubled, but MySQL and MariaDB strings, and PostgreSQL E'...' strings, also skip a quote escaped with a backslash. So a SELECT could hide stacked statements that clear transaction_read_only, COMMIT and DROP a table. Pull request 505 fixed it, merged November 12 and released in 1.7.0 on November 16, 2026; npm listed 2.1.0 as the latest on November 28. Separately, Trend's Zero Day Initiative published ZDI-26-1067 (CVE-2026-136441, CVSS 9.8) on November 24, 2026 as a zero-day: an incorrect authorization decision when DBHub's MCP server parses untrusted SQL lets a remote caller bypass authentication. ZDI names no fixed version, and DBHub's repository listed no advisory for it on November 28. So upgrade, but don't let read-only mode be the only thing between an agent and your data: connect with a database account that can only read.

What should I check, step by step?

1. Check the DBHub version on every machine and container that runs it: anything before 1.7.0 has the backslash-quote bypass. Upgrade to the current release (2.1.0 on npm on November 28, 2026).

  1. Give DBHub a database user that has only SELECT on the schemas it needs. Then a statement the read-only check misses is still refused by the database itself.
  2. On PostgreSQL, also make that user's sessions read-only on the server side (for example default_transaction_read_only on the role), and don't grant superuser, pg_read_server_files or pg_write_server_files.
  3. On MySQL and MariaDB, don't grant the FILE privilege or any write privilege to DBHub's user, and set secure_file_priv.
  4. If you run DBHub over HTTP, keep it on localhost or behind an authenticating proxy, and don't expose it to other machines. ZDI's only listed mitigation for ZDI-26-1067 is to restrict interaction with the product.
  5. Look at the database's own logs for DDL, COMMIT or SET statements from DBHub's user since you first connected it, especially statements that arrived inside one long SELECT.
  6. Keep a dated record of the version, the database grants and the transport you run, so you can show what was exposed and when it changed.

How did CVE-2026-134803 let writes past DBHub's read-only check?

DBHub's execute_sql tool can be set to read-only. Before it sends a query, it splits the text into statements and checks each one. The connector then runs the original string, and the MySQL and MariaDB connectors allow several statements in one call.

What did DBHub 1.7.0 change, and what does it still not cover?

The fix scans MySQL and MariaDB strings with backslash escapes and PostgreSQL E'...' strings the way the servers do. Because DBHub can't see the server's sql_mode, it checks MySQL and MariaDB text three ways (the server default, NO_BACKSLASH_ESCAPES and ANSI_QUOTES) and refuses the query if any reading shows a statement that isn't a read. explain_sql now needs exactly one statement under every reading.

Why does ZDI-26-1067 mean DBHub's read-only mode can't be the only control?

ZDI's advisory, published November 24, 2026, says the flaw is in DBHub's MCP server implementation and comes from an incorrect authorization decision when parsing untrusted SQL, letting a remote attacker bypass authentication without credentials. ZDI says it reported the issue to the vendor on July 18, 2025, asked for updates later in 2025, and told the vendor on November 9, 2026 that it would publish as a zero-day.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “After upgrading DBHub and switching it to a read-only database user, record a receipt with a hash of the new grants and the config we now run, so we can show what changed and when.”

One-click setup

{
  "tool": "record_action",
  "arguments": {
    "action_type": "security.config_change",
    "outcome": "success",
    "occurred_at": "2026-11-28T20:00:00Z",
    "client_event_id": "dbhub:cve-2026-134803:hardening",
    "summary": "DBHub upgraded to 2.1.0 on all hosts; execute_sql readonly kept on; new database user with SELECT only, no FILE privilege, server-side read-only sessions; HTTP transport bound to localhost behind an authenticating proxy; database logs reviewed for DDL/COMMIT/SET from the old user",
    "action_sha256": "<sha256 of the exported grants and the DBHub config file>"
  }
}

Rightshold isn't affiliated with Bytebase, DBHub or Trend's Zero Day Initiative. Details are from GitHub's advisory database entry GHSA-p6h8-6r97-q9rf (CVE-2026-134803), DBHub pull request 505 and the v1.7.0 release notes, DBHub's repository advisories GHSA-mwwr-p57h-56pf and GHSA-j656-3hf2-fvjc, and ZDI advisory ZDI-26-1067, with the current version from the npm registry, all read November 28, 2026. Advisories get updated; confirm affected and fixed versions on the linked pages.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'