CVE-2026-138027: Bagel before 2.5.5 Unsandboxed DuckDB SQL Execution via query_messages

Published Nov 27, 2026
·
Updated

Bagel (bagel-mcp) before 2.5.5 exposes unsandboxed DuckDB SQL execution through the read-only annotated querymessages MCP tool, allowing file access and network requests. Attackers who prompt-inject the driving LLM via recorded logs or topics can invoke readcsvauto, COPY TO, or httpfs to read and write files and perform server-side request forgery.

Affected Software

1 affected component
Bagel bagel-mcp<2.5.5

Event History

Nov 27, 2026
CVE Published
via MITRE·07:15 PM
Data Sourced
via MITRE·07:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:18 PM
DescriptionSeverityWeakness
Event
via NVD·08:18 PM

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Deployments of Bagel bagel-mcp before 2.5.5 are exposed when the driving LLM can be prompt-injected through recorded logs or topics and can invoke the annotated query_messages MCP tool.

2

What does an attacker need to exploit it?

The attacker needs a way to place prompt-injection content into recorded logs or topics that the driving LLM processes. No authenticated privileges are required, but user interaction is required according to the supplied vector.

3

Does the query_messages tool need to be explicitly writable for this to be dangerous?

No. Although query_messages is described as read-only, its unsandboxed DuckDB SQL execution can use read_csv_auto, COPY TO, or httpfs to access files, write files, and make network requests.

4

What is the immediate remediation?

Upgrade Bagel bagel-mcp to version 2.5.5 or later. The issue affects versions before 2.5.5.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203