{"id":"CVE-2026-138027","aliases":[],"kind":"cve","tier":"hot","status":"published","title":"Bagel before 2.5.5 Unsandboxed DuckDB SQL Execution via query_messages","description":"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.","ai_summary":{"text":"An attacker who prompt-injects the LLM driving Bagel can run unsandboxed DuckDB SQL via the query_messages MCP tool to read and write files and make server-side requests.","model":"claude-haiku-5-5","label":"AI summary"},"severity":"high","cvss":{"score":7.7,"version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"CNA"},"scores":[{"score":7.7,"source":"cna","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},{"score":7.5,"source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},{"score":7.7,"source":"cna","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","version":"4.0"}],"cwe":["CWE-749"],"remote":true,"remote_unauth":true,"epss":null,"kev":{"listed":false,"added":null,"due":null,"ransomware":null},"exploit":{"public":false,"exploitdb_ids":[]},"affected":[],"affected_products":[{"source":"cvelist","vendor":"Extelligence-ai","product":"Bagel","versions":"< 2.5.5"}],"ai_versions":{"affected":[{"text":"Bagel (bagel-mcp) before 2.5.5 exposes unsandboxed DuckDB SQL execution through the read-only annotated query_messages MCP tool","quote":"Bagel (bagel-mcp) before 2.5.5 exposes unsandboxed DuckDB SQL execution through the read-only annotated query_messages MCP tool","product":"bagel"}],"fixed":[{"quote":"before 2.5.5","product":"bagel","version":"2.5.5"}],"model":"claude-haiku-5-5","label":"AI-extracted versions"},"mitigation":"Upgrade Bagel to 2.5.5 or later.","technologies":[{"slug":"mcp-servers","name":"MCP servers and SDKs","method":"ai"},{"slug":"python","name":"Python","method":"ai"}],"references":[{"url":"https://github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5","kind":"vendor"},{"url":"https://github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1dc420ee4f","kind":"patch"},{"url":"https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/query.py#L11-L29","kind":"article"},{"url":"https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/server.py#L246","kind":"article"},{"url":"https://github.com/Extelligence-ai/bagel/releases/tag/v2.5.5","kind":"other"},{"url":"https://www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-execution-via-query-messages","kind":"other"}],"workarounds":null,"vendors":["extelligence-ai"],"products":["bagel"],"cpes":[],"published_at":"2026-11-27T19:15:20.080Z","modified_at":"2026-11-27T20:18:18.177Z","promoted_at":null,"attribution":[{"source":"CVE Program","text":"CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation.","url":"https://www.cve.org/Legal/TermsOfUse"},{"source":"NVD","text":"This product uses data from the NVD API but is not endorsed or certified by the NVD.","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138027"}],"links":{"html":"https://flawdb.com/CVE-2026-138027","markdown":"https://flawdb.com/CVE-2026-138027.md","json":"https://flawdb.com/api/v1/entries/CVE-2026-138027"}}