CVE-2026-61789
Last modified
CVE-2026-61789 is a medium-severity vulnerability rated 6.1/10 on the CVSS scale. DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Prior to 0.22.6, read-only SQL validation can be bypassed on the MySQL and MariaDB connectors.
Description
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Prior to 0.22.6, read-only SQL validation can be bypassed on the MySQL and MariaDB connectors. In `src/utils/sql-parser.ts`, `scanSingleLineComment` treats every double dash as a comment start, whereas MySQL and MariaDB require following whitespace, a control character, or the end of the line. The read-only check in `src/tools/execute-sql.ts` validates split statements with `isReadOnlySQL`, but `src/connectors/mysql/index.ts` and `src/connectors/mariadb/index.ts` execute the original string with `multipleStatements` enabled. A double dash followed by a non-whitespace character can therefore hide a subsequent write or destructive DDL statement from the validator while the database interprets the dashes as minus operators and executes both statements. Anyone able to influence the assistant's SQL, including through prompt injection in content the assistant reads, can bypass read-only mode to modify or drop database data, subject to the database account's privileges. PostgreSQL is not affected by this path because its double-dash parsing agrees with the checker and its connector executes individual split statements. This issue is fixed in version 0.22.6.
Metrics
Weakness Enumeration
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-61789?
How severe is CVE-2026-61789?
How do I fix CVE-2026-61789?
How Strix Helps
- Uncovering a hidden BOLA in Appsmith's snapshot logicStrix autonomously discovered a BOLA/IDOR vulnerability in Appsmith's snapshot deletion path.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-6178The Betheme theme for WordPress is vulnerable to Stored Cros…6.4
- CVE-2026-61781pg_partman is a PostgreSQL extension that manages partitione…9.9
- CVE-2026-61782Rsdoctor is a build analyzer tailored for projects built wit…7.5
- CVE-2026-61783Wazuh is an open-source security platform providing unified …6.5
- CVE-2026-61784xhtml-purifier is a Node.js library to take in raw/unknown/u…6.1
- CVE-2026-61788DBHub is a database MCP server for Postgres, MySQL, SQL Serv…7.4
- CVE-2026-6179Stored Cross Site Scripting in NightWolf Penetration Testing…5.4
- CVE-2026-61790Weblate is a web-based continuous localization platform used…4.4
- CVE-2026-61791OCO-Server is a self-hosted endpoint management application …7.4
- CVE-2026-61792Weblate is a web-based continuous localization platform used…7.7
- CVE-2026-61793Nuxt OG Image generates OG Images with Vue templates in Nuxt…6.9
- CVE-2026-61794Capsule is a multi-tenancy and policy-based framework for Ku…6.8
Are you affected by CVE-2026-61789?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
