{"id":"CVE-2026-138027","summary":"Bagel before 2.5.5 Unsandboxed DuckDB SQL Execution via query_messages","details":"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.","aliases":["CVE-2026-138028","GHSA-gx2g-3pch-43q5"],"modified":"2026-11-27T21:11:12.506542345Z","published":"2026-11-27T19:15:20.080Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138027.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-749"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138027.json"},{"type":"PACKAGE","url":"https://github.com/Extelligence-ai/bagel"},{"type":"ARTICLE","url":"https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/query.py#L11-L29"},{"type":"ARTICLE","url":"https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/server.py#L246"},{"type":"FIX","url":"https://github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1dc420ee4f"},{"type":"ADVISORY","url":"https://github.com/Extelligence-ai/bagel/releases/tag/v2.5.5"},{"type":"ADVISORY","url":"https://github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138027"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-execution-via-query-messages"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/extelligence-ai/bagel","events":[{"introduced":"0"},{"fixed":"cbec958edd9ce105b9005c9e31631b1dc420ee4f"}],"database_specific":{"extracted_events":[{"strategy":"StandardRange","range":[{"introduced":"0"},{"fixed":"2.5.5"}],"source":"AFFECTED_FIELD"},{"range":[{"fixed":"cbec958edd9ce105b9005c9e31631b1dc420ee4f"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"v2.5.5","range":[{"fixed":"cbec958edd9ce105b9005c9e31631b1dc420ee4f"}]}]}}],"versions":["v2.5.4","v2.5.3","v2.5.2","v2.5.1","v2.4.3","v2.4.1","v2.4.0","v2.3.1","v2.3.0","v2.2.3","v2.2.2","v2.2.1","v2.2.0","v2.1.1","v2.1.0","v2.0.0","v1.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138027.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}