---
title: "CVE-2026-138027: Bagel - Server Side Request Forgery & File Access"
description: "Bagel (bagel-mcp) < 2.5.5 contains a server-side request forgery and file access vulnerability caused by unsandboxed DuckDB SQL execution in the read-only annotated query_messages MCP tool, letting attackers invoke read_csv_auto, COPY TO, or httpfs to read/write files and perform SSRF, exploit requires attacker to prompt-inject the driving LLM via recorded logs or topics."
url: https://panop.io/threat-heartbeat/CVE-2026-138027/
---

# CVE-2026-138027 Bagel - Server Side Request Forgery & File Access

Bagel (bagel-mcp) < 2.5.5 contains a server-side request forgery and file access vulnerability caused by unsandboxed DuckDB SQL execution in the read-only annotated query\_messages MCP tool, letting attackers invoke read\_csv\_auto, COPY TO, or httpfs to read/write files and perform SSRF, exploit requires attacker to prompt-inject the driving LLM via recorded logs or topics.

CVSS base score 7.5 /10

High

CISA KEV

Not listed

Public exploit

None known

EPSS

0.59% chance of exploitation in 30 days

[View the NVD record ↗](https://nvd.nist.gov/vuln/detail/CVE-2026-138027)

## Details

Type

Server Side Request Forgery

Impact

File System Read, File System Write, Server Side Request Forgery

CVSS vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Published

27 November 2026

Updated

29 November 2026

Weakness

[CWE-749](https://cwe.mitre.org/data/definitions/749.html)

## Vendor fix

Update to version 2.5.5 or later.

Patching closes this CVE. It does not tell you which of your systems run the affected version, or what else is exposed alongside them.

## References

- [https://nvd.nist.gov/vuln/detail/CVE-2026-138027](https://nvd.nist.gov/vuln/detail/CVE-2026-138027)
- [https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel\_mcp/server.py#L246](https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/server.py#L246)
- [https://github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1dc420ee4f](https://github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1dc420ee4f)
- [https://github.com/Extelligence-ai/bagel/releases/tag/v2.5.5](https://github.com/Extelligence-ai/bagel/releases/tag/v2.5.5)
- [https://github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5](https://github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5)
- [https://www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-execution-via-query-messages](https://www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-execution-via-query-messages)
- [https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel\_mcp/query.py#L11-L29](https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/query.py#L11-L29)

[← All CVEs](https://panop.io/threat-heartbeat/)

## What this record can't tell you

- Whether you run the affected software, and where
- Whether an attacker can actually reach and exploit it
- The misconfigurations that never get a CVE number
- What it would cost the business, ranked into what to fix first

Panop answers these inside your environment, for this CVE and every other finding.

[Book a demo](https://panop.io/demo)
