Description
DBHub 1.1.0 before 1.6.1 contains a validation bypass in the explain_sql tool that allows MCP clients to execute statements instead of only planning them. Attackers can submit ANALYSE SELECT or (ANALYSE) SELECT input to run arbitrary read-only queries and functions like pg_sleep against PostgreSQL sources.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| bytebase | dbhub | 1.1.0 <1.6.1 | — |
References
- https://github.com/bytebase/dbhub/blob/0b2532b26da6e31a88d9533b6958b346bb735640/src/tools/explain-sql.ts#L43-L70
- https://github.com/bytebase/dbhub/issues/501
- https://github.com/bytebase/dbhub/commit/87c6fc565a1ab17906bea8314862f871206e9c8c
- https://github.com/bytebase/dbhub/releases/tag/v1.6.1
- https://www.vulncheck.com/advisories/dbhub-1.1.0-before-1.6.1-validation-bypass-via-explain-sql-analyse-keyword