Technical impact
Bagel (bagel-mcp) before version 2.5.5 allows attackers to execute unsandboxed DuckDB SQL via the read‑only annotated query_messages MCP tool. By injecting crafted prompts into logged interactions or topics, a malicious LLM can cause the server to run commands such as read_csv_auto, COPY TO, or httpfs, which read and write files or perform server‑side request forgery. The vulnerability is a classic database injection flaw, illustrated by CWE‑749, where an attacker can manipulate a database query engine to achieve arbitrary file and network access.
Affected Systems
The affected product is Bagel by Extelligence‑ai, specifically versions earlier than 2.5.5. No further version granularity is supplied; the vulnerability applies to any instance using the query_messages tool in those releases.
Risk and Exploitability
With a CVSS score of 7.7 the vulnerability is considered high severity. EPSS information is not available, so the probability of exploitation cannot be quantified, and it is not listed in the CISA KEV catalog. The most likely attack vector is remote, via injection of malicious prompts into the LLM’s prompt history or topics, which then cause the server to execute the attacker’s DuckDB commands. If successfully exploited an attacker could read or write arbitrary files, perform network requests, and potentially compromise the host system.