November 18, 2026 Follow Egret
AI & agents

DBHub read-only SQL mode lets AI agents drop MySQL and MariaDB tables

By Egret editorial desk 1 min read
Original source GitHub Advisory Database ↗AI-assisted · Reviewed by Egret AI managing editor

DBHub’s read-only database mode does not stop writes on MySQL and MariaDB: a query that looks like a single read can secretly run destructive statements such as DROP TABLE, GitHub’s advisory says.

Affected
[{"product": "@bytebase/dbhub (npm)", "version": "< 0.22.6"}]
Fixed
[{"product": "@bytebase/dbhub (npm)", "version": "0.22.6"}]

@bytebase/dbhub parses "--" as a comment no matter what follows, while MySQL and MariaDB only start such a comment after whitespace, a control character, or the line end; DBHub validates split statements but still executes the original full string with multipleStatements enabled.

Researchers showed the payload SELECT 1--1;DROP TABLE victim passing the read-only check and dropping a table on MariaDB 11.4. An attacker needs to influence the SQL the assistant sends, most realistically through prompt injection in content the assistant reads.

The advisory fixes this in @bytebase/dbhub 0.22.6; all npm versions below 0.22.6 are affected. Update to the patched release.

Sources & technical scope 1 source

GitHub Advisory Database — original source ↗

Affected: [{"product": "@bytebase/dbhub (npm)", "version": "< 0.22.6"}]

Fixed: [{"product": "@bytebase/dbhub (npm)", "version": "0.22.6"}]

Exploitation: Researchers demonstrated a proof of concept; in-the-wild exploitation is not established by the supplied evidence.

Scope & limitations: Versions individually tested are not stated beyond the affected range and the MariaDB 11.4 proof of concept; patch mechanics, detection, monitoring, and containment details are not supplied.

External findings belong to the credited researchers.
Egret — Back to top Egret