AI Stack Alert High CVE-2026-138027 For AI Eng, AppSec, SOC / IR AI-assisted
CVE-2026-138027: Bagel (bagel-mcp) before 2.5.5 allows unsandboxed DuckDB SQL via query_messages MCP tool
Bagel (bagel-mcp) before version 2.5.5 exposes unsandboxed DuckDB SQL execution through its read-only annotated query_messages MCP tool. The flaw allows file access and network requests. The source states that CVSS base score is 7.7.
Why it matters
Organizations running affected bagel-mcp servers with an LLM agent can have files read or written and server-side requests made from the host. Attackers who influence the LLM through recorded logs or topics can reach these capabilities.
Do this
- Upgrade bagel-mcp to version 2.5.5 or later.
- Until patched, remove or disable the query_messages MCP tool on affected servers.
- Review DuckDB configuration and restrict file system and network access for the MCP server process.
- Hunt for unexpected read_csv_auto, COPY TO, or httpfs usage in MCP server and DuckDB logs.
- Treat recorded logs and topics as untrusted input when they reach an LLM agent that can call MCP tools.
Exploit Clock
No signals yet
- No exploitation signals yet
Signals
- NoCISA KEV
- 7.7CVSS
- NoPublic PoC
- 34/100Priority
- 70%Confidence
Evidence
“Bagel (bagel-mcp) before 2.5.5 exposes unsandboxed DuckDB SQL execution through the read-only annotated query_messages MCP tool, allowing file access and network requests.”
“Attackers who prompt-inject the driving LLM via recorded logs or topics can invoke read_csv_auto, COPY TO, or httpfs to read and write files and perform server-side request forgery.”
Sources
Affected / related
bagel-mcp, prompt injection, DuckDB
Published 2026-11-27 20:18 UTC · updated 2026-11-27 22:35 UTC · AI-assisted summary, checked against quoted sources · How we score