Unsandboxed SQL Execution in Bagel by Extelligence
CVE-2026-138027
7.7HIGH
What is CVE-2026-138027?
The Bagel (bagel-mcp) version before 2.5.5 exposes a significant SQL execution vulnerability that occurs through the read-only annotated query_messages MCP tool. This flaw allows attackers to execute unsandboxed DuckDB SQL queries, which can lead to unauthorized file access and network requests. By exploiting recorded logs or topics, an attacker could prompt-inject a malicious LLM, thereby invoking functions like read_csv_auto or COPY TO, and potentially perform server-side request forgery. Users are advised to upgrade to version 2.5.5 or later to mitigate this exposure.
Affected Version(s)
Bagel 0 < 2.5.5
