CVE-2026-138027

Bagel model-generated SQL could access server files and network resources

Extelligence-ai · Bagel MCP

First documented disclosure · Review checkpoint

Summary

Model-directed SQL and predicates ran with the ordinary DuckDB connection’s external access.

Severity and exploitation evidence

High · 7.7/10 · CVSS 4.0. Severity source.

Exploitation not established: The reviewed sources establish a disclosed weakness or controlled evidence, not malicious exploitation against users. No product, package or payload was executed in this review.

Exploitation evidence source

Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.

How the weakness works

The query tool and pipeline SQL paths accepted model-controlled SQL without a single-SELECT gate or an isolated connection with external access disabled.

Conditions required

An agent invokes the affected query or pipeline path with attacker-influenced SQL, potentially after reading prompt-injected topic or log content.

Potential impact

Read or write files and make network requests within the Bagel process’s permissions and reachability.

Affected versions and configurations

Before 2.5.5, according to the maintainer and CNA.

Fix and mitigation status

2.5.5 isolates model SQL and predicates, disables external access and extension loading, locks configuration, and requires a single SELECT for statement paths.

Practical next steps

Upgrade to 2.5.5 or later and restrict the server’s filesystem and network authority.

Operating lesson

Treat generated SQL as code with explicit resource boundaries.

Evidence and limits

The public correction PR opened November 15 at 08:35:31Z, merged at 08:47:17Z, and was followed by release 2.5.5 at 08:47:22Z and the advisory at 08:48:17Z. CVE publication on November 27 does not reset disclosure. The single GHSA groups SQL and rsync findings, now separately numbered 138027 and 138028. PyPI confirms non-yanked 2.5.5 artifacts; no package was installed. The project’s robotics integrations do not establish device compromise. Severity is VulnCheck CNA CVSS 4.0, not the original reporter’s qualitative rating.

Sources