If you connect AI agents to MySQL, MariaDB or Postgres through DBHub in read-only mode, update to 1.7.0 or later

DBHub MCP server: read-only mode could be bypassed to write to or drop database tables, fixed in 1.7.0 · Security incident · GitHub Advisory Database · bytebase · Nov 23, 2026

What happened

A high-severity advisory (CVE-2026-134803, GHSA-p6h8-6r97-q9rf) published 23 Nov 2026 says DBHub before 1.7.0 let MCP clients limited to read-only execute_sql run write and DDL statements. The SQL parser misread backslash-escaped quotes, so stacked statements hidden inside a string could clear transaction_read_only or COMMIT and then modify or drop MySQL, MariaDB or PostgreSQL data. The fix shipped in DBHub v1.7.0 on 16 Nov 2026.

How to prevent it

Don't rely on a tool's read-only switch alone: give the agent a database user that only has SELECT on the tables it needs, so a parser bug can't turn into writes or drops. Keep MCP servers updated.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I use DBHub, which can read web pages, files, emails or tool output. Help me reduce the risk of prompt injection (hidden instructions in content the AI reads). 1) List what my setup can access (files, terminal, browser, MCP servers, email, databases) and what it can do without asking me. 2) Point out the riskiest combinations, e.g. reading untrusted content while also having access to secrets or the ability to send data out. 3) Suggest concrete settings: require approval for commands and network calls, remove MCP servers I don't need, use read-only tokens, and keep the tool updated. 4) Give me a short checklist to follow before opening untrusted repos or documents. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: trusting agents & ai input

An AI agent treats everything it reads as possible instructions: a web page, a README, an email, a code comment or the output of another tool. If that content was written by an attacker, the agent can be steered into running commands, reading files or sending data somewhere it should not.

A quick checklist before you ship

More on this: every trusting agents & ai input story and our related guide.

Tools involved

DBHub stories, MCP stories

Related stories

Source: original post on GitHub Advisory Database ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.