Skip to content
GHSA Gx2g 3pch 43q5

GHSA Gx2g 3pch 43q5

github.com • November 28, 2026

Upgrade with pip install -U bagel-mcp (or uvx bagel-mcp@latest ); Docker users pull the 2.5.5 images.

Model-supplied SQL ( query_messages , sql gates, topic_sql tasks) and every event predicate now run on a separate DuckDB connection with external access, extension install and autoload, and Python replacement scans disabled, and its configuration locked. Statements must be a single SELECT .

The rsync task's options are an allowlist; -e / --rsh , --rsync-path , file-writing flags and sources starting with - are rejected.

Thanks to Syed Anas Mohiuddin, maintainer of mcp-safeguard, for the report and for coordinating disclosure.

Two findings: a Critical unsandboxed SQL execution path via DuckDB (arbitrary file read/write + SSRF, verified locally with a working PoC), and a High command-injection path via an rsync pipeline task's argument handling, on a host typically wired to real ROS/MQTT physical-device control.

Finding 1 -- Critical: Unsandboxed DuckDB SQL execution in query_messages

server.py:222-232 (and the same pattern in src/pipeline/gates/sql.py:30-31 and src/pipeline/tasks/topic_sql.py:47-48 ): the query_messages MCP tool is explicitly documented and designed to accept LLM-generated sql_statement text (the tool's own docstring demonstrates raw SQL syntax as the expected input). That string is handed straight to duckdb.sql() on the shared default connection -- no SELECT-only allowlist, no enable_external_access=false , nothing.

I verified locally (on my own machine only, no live/deployed instance touched) that this achieves:

Arbitrary file read: read_csv_auto('/etc/passwd')

Arbitrary file write: COPY ... TO '/tmp/x'

SSRF: INSTALL httpfs; LOAD httpfs; succeeds with zero restriction, opening requests to internal endpoints (e.g. cloud metadata services) with results returned straight into the tool's JSON output.

Attack path: prompt-injected text in a log/topic/capability the LLM reads steers it into calling query_messages with a malicious sql_statement .

Remediation: parse/allowlist to SELECT-only via a real SQL parser, and run on an isolated connection configured with enable_external_access=false / lock_configuration=true .

Finding 2 -- High: Command injection via rsync task's options field

src/pipeline/tasks/rsync_files.py:75-138 : the options denylist only blocks --quiet and --log-format (lines 77-81). -e / --rsh (rsync's own "run this as the transport command" flag) is not blocked, so a pipeline config's options: ["-e", "sh -c '...'"] passes straight through into the argv list at line 134 ( command = ["rsync", *self._options, self._source, temp_dir] ) and executes arbitrary commands as the server process -- a host that's typically wired to ROS/MQTT device control given this project's robotics/drone/IoT focus.

Remediation: switch to an explicit flag allowlist instead of a two-item denylist.

Syed Anas Mohiuddin -- maintainer of mcp-safeguard, an open-source MCP/agent security scanner; also credited on CVE-2026-14540 (SSRF in Google's official MCP Toolbox, google/genai-toolbox).

I'd like to coordinate responsible disclosure -- 90 days or longer if needed. If you're able to credit the report, the credit line "Syed Anas Mohiuddin, maintainer of mcp-safeguard" works well if useful. Happy to request a CVE through GitHub's advisory flow if useful for your records.

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.