Bagel before 2.5.5 Unsandboxed DuckDB SQL Execution via query_messages
Summary
| CVE | CVE-2026-138027 |
|---|---|
| State | PUBLISHED |
| Assigner | VulnCheck |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-27 20:18:18 UTC |
| Updated | 2026-11-27 20:18:18 UTC |
| Description | 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. |
Risk And Classification
Primary CVSS: v4.0 7.7 HIGH from [email protected]
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS: 0.005880000 probability, percentile 0.421140000 (date 2026-11-29)
Problem Types: CWE-749 | CWE-749 Exposed Dangerous Method or Function
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 7.7 | HIGH | 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/E:X/C... |
| 4.0 | CNA | CVSS | 7.7 | HIGH | 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 |
| 3.1 | [email protected] | Primary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 7.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
HighAttack Requirements
PresentPrivileges Required
NoneUser Interaction
PassiveConfidentiality
HighIntegrity
HighAvailability
HighSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
NoneUser Interaction
RequiredScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Extelligence-ai | Bagel | affected 2.5.5 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/server.py | [email protected] | github.com | |
| www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-executio... | [email protected] | www.vulncheck.com | |
| github.com/Extelligence-ai/bagel/releases/tag/v2.5.5 | [email protected] | github.com | |
| github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1d... | [email protected] | github.com | |
| github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/query.py | [email protected] | github.com | |
| github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5 | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Syed Anas Mohiuddin (en)
There are currently no legacy QID mappings associated with this CVE.