Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant prompt injection in recorded logs/topics
-
DeliveryDriving LLM ingests poisoned content
-
ExploitLLM invokes query_messages with malicious DuckDB SQL
-
ExecutionUnsandboxed engine runs read_csv_auto/COPY TO/httpfs
-
ImpactRead/write host files and SSRF to internal endpoints
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Dangerous method exposure prevention
|
| Exploitation Conditions | Requires a deployed bagel-mcp instance before 2.5.5 exposing the query_messages MCP tool to a driving LLM, where that LLM ingests attacker-influenced data - recorded logs, topics, or capabilities. The attacker must get prompt-injection content into that data and successfully steer the LLM into calling query_messages with malicious DuckDB SQL; in affected versions the SQL runs on the shared default DuckDB connection with no SELECT-only allowlist and external access/extension install left enabled, so no non-default configuration is needed - the unsandboxed SQL interface is the intended, default behavior. Limiting factors that reduce realistic risk below the raw score: exploitation is gated on a successful indirect prompt injection and on the LLM acting on it (reflected as AC:H, AT:P and UI:P), and the attacker needs a path to insert content into logs/topics the LLM reads; authentication is not required (PR:N). |
| Impact | This is a genuine but conditional risk rather than a drop-everything emergency. The CVSS 4.0 base score is 7.7 (High) with AV:N and PR:N, which looks alarming, but the same vector qualifies it heavily: AC:H, AT:P and UI:P all signal that exploitation is not a simple one-shot remote hit - it depends on an attacker successfully prompt-injecting the driving LLM and that LLM acting on the poisoned content. The vuln.today decision label is 'this_week' (not act_now/emergency), which is consistent with a serious-but-gated issue. There is no CISA KEV listing, so this is not confirmed actively exploited, and no EPSS probability was supplied in the input, so widespread-exploitation likelihood cannot be quantified here. Countervailing the gating factors, the technical impact is severe (VC:H/VI:H/VA:H: arbitrary file read, file write, and SSRF to internal/cloud-metadata endpoints) and the reporter states they verified a working proof-of-concept locally, so the capability is proven even though no public exploit code has been released. Net: a real priority to patch in normal cadence, elevated for anyone running bagel-mcp with an LLM wired to untrusted logs/topics, but the AC:H/AT:P/UI:P prerequisites make opportunistic mass exploitation unlikely. |
| Exploit ScenarioDerived | An attacker seeds prompt-injection text into robot/drone/IoT logs or topics that a Bagel MCP server records; when an operator's LLM later analyzes that data, the injected instructions steer it into calling the read-only-annotated query_messages tool with crafted DuckDB SQL. Because the SQL runs unsandboxed, the attacker uses read_csv_auto to read local files (e.g. /etc/passwd), COPY TO to write files, and INSTALL/LOAD httpfs to perform SSRF against internal or cloud-metadata endpoints with results returned in the tool output. The reporter verified this locally with a working PoC; no public exploit code has been published. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 27, 2026
Unsandboxed DuckDB SQL execution in bagel-mcp before 2.5.5 turns the read-only-annotated query_messages MCP tool into an arbitrary file read/write and SSRF primitive that a prompt-injected driving LLM can reach through logs, topics or capabilities it ingests. Exploitation is conditional: it requires an attacker to plant prompt-injection content in data the model reads and to steer it into calling query_messages with malicious SQL (reflected as AC:H, AT:P and UI:P, unauthenticated per PR:N), with no non-default configuration needed since the unsandboxed SQL interface is the intended default behaviour. The result is a genuine but conditional risk rather than a drop-everything emergency, prioritised this_week; there is no CISA KEV entry or confirmed active exploitation, and the disclosure includes a reporter-verified local proof of concept but no published exploit tooling. Fixed in 2.5.5.
RemediationAI
Upgrade to the vendor-released fix, bagel-mcp 2.5.5, via pip install -U bagel-mcp or uvx bagel-mcp@latest, and Docker deployments should pull the 2.5.5 images; the code fix is https://github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1dc420ee4f (PR #311), and the vendor's SECURITY.md now treats SQL that escapes the new sandbox as in scope, which makes 2.5.5 the only complete remedy. Because the exploitation path runs through a driving LLM that ingests untrusted logs, topics or capabilities, interim exposure reduction means not letting such a model drive query_messages (and the sql gate / topic_sql task paths) until the upgrade is applied, accepting the loss of that query capability; the 2.5.5 rsync hardening in the same advisory also rejects -e/--rsh, --rsync-path and other command-running or file-writing options, so rsync pipeline configs using those flags must be reworked (for an SSH port or key, use a Host entry in ~/.ssh/config instead of -e). Advisory: https://github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5; additional detail at https://www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-execution-via-query-messages. Remediation priority is this_week, not an act-now emergency, given the prompt-injection prerequisite.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
bagel-mcp is an MCP (Model Context Protocol) server for robotics/IoT pipelines - the advisory notes deployments are typically wired to real ROS/MQTT device control - and query_messages is documented as an intentional SQL interface whose sql_statement argument is LLM-generated text. Before 2.5.5 that string was passed directly to duckdb.sql() on the shared default DuckDB connection (bagel_mcp/query.py lines 11-29, invoked at server.py line 246 and mirrored in pipeline/gates/sql.py and pipeline/tasks/topic_sql.py), with no SELECT-only allowlist and with DuckDB's external access and extension install/autoload still enabled. This is an instance of CWE-749 (Exposed Dangerous Method or Function) rather than a memory-safety bug: the dangerous capability is the raw SQL surface itself, reachable through a tool the caller believes is read-only. The reporter demonstrated read_csv_auto('/etc/passwd') for file read, COPY ... TO for file write, and INSTALL httpfs / LOAD httpfs to open outbound requests (e.g. to cloud metadata endpoints) whose results are returned in the tool's JSON output. The 2.5.5 fix routes all model- or config-supplied SQL (query_messages statements, sql gates, topic_sql tasks and every event predicate) onto a separate sandboxed DuckDB connection with external access, extension install/autoload and Python replacement scans disabled and configuration locked, accepting only a single SELECT statement, with data supplied as an Arrow stream from the thread's ordinary connection; the same advisory also hardens an rsync pipeline task (CWE-88/CWE-94) by replacing a two-item denylist with a flag allowlist that rejects -e/--rsh, --rsync-path, file-writing flags and sources starting with '-'.
Know when Bagel gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-delivered and unauthenticated (AV:N/PR:N), but success needs a successful prompt injection and the LLM to act on it (AC:H, UI:R); unsandboxed file read/write and SSRF give C:H/I:H/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Technical POC Analysis
Bug class: exposed dangerous method or function (CWE-749 per the CVE record; the upstream advisory GHSA-gx2g-3pch-43q5 files the combined report under CWE-94, "improper control of generation of code"…
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-138027 in bagel-mcp versions before 2.5.5 allows a maliciously prompted AI model to execute arbitrary SQL, enabling unauthorized file access and network requests. This could lead to data exposure or system compromise, affecting teams relying on the MCP tool for messaging. Leadership should prioritize remediation due to high severity and the conditional but realistic risk of exploitation.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
EUVD-2026-137493
GHSA-xrqm-r82m-j847
NVD
CVE.org
EPSS
VulDB
Exploit-DB