Katalog CVE

CVE-2026-61789

ŚrednieCVSS 6.1
Opublikowano: Zaktualizowano: Przetłumaczono: NVD NIST

Prawdopodobieństwo exploitacji (EPSS)

Niskie ryzyko
0.39%

Percentyl 33 - wyżej niż 33% wszystkich znanych CVE

Streszczenie

W DBHub przed wersją 0.22.6 walidacja SQL tylko do odczytu może być obejściowa na konektorach MySQL i MariaDB. Podwójny myślnik bez następującego białego znaku może ukryć przed walidatorem kolejną instrukcję zapisu lub destrukcyjną DDL, podczas gdy baza interpretuje myślniki jako operatory minus i wykonuje obie instrukcje. Każdy, kto może wpłynąć na SQL asystenta, w tym przez wstrzyknięcie promptu, może obejść tryb tylko do odczytu i modyfikować lub usuwać dane.

Ocena ryzyka

Osoba mogąca wpłynąć na zapytania SQL asystenta może obejść tryb tylko do odczytu i modyfikować lub usuwać dane w bazie, w zależności od uprawnień konta bazy danych. Stanowi to poważne ryzyko integralności i dostępności danych.

Rekomendacja

Zaktualizuj DBHub do wersji 0.22.6 lub nowszej, aby naprawić obejście walidacji SQL tylko do odczytu na konektorach MySQL i MariaDB.

Inne podatności w DBHub

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

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.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS