{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "2.5.5"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "cbec958edd9ce105b9005c9e31631b1dc420ee4f"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v2.5.5",
                "range": [
                  {
                    "fixed": "cbec958edd9ce105b9005c9e31631b1dc420ee4f"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "cbec958edd9ce105b9005c9e31631b1dc420ee4f"
            }
          ],
          "repo": "https://github.com/extelligence-ai/bagel",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-gx2g-3pch-43q5"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-749"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138027.json"
  },
  "details": "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.",
  "id": "CVE-2026-138027",
  "modified": "2026-11-27T20:45:50.143815687Z",
  "published": "2026-11-27T19:15:20.080Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138027.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Extelligence-ai/bagel"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/query.py#L11-L29"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/Extelligence-ai/bagel/blob/v2.5.4/bagel_mcp/server.py#L246"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Extelligence-ai/bagel/commit/cbec958edd9ce105b9005c9e31631b1dc420ee4f"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/Extelligence-ai/bagel/releases/tag/v2.5.5"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/Extelligence-ai/bagel/security/advisories/GHSA-gx2g-3pch-43q5"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138027"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/bagel-before-2.5.5-unsandboxed-duckdb-sql-execution-via-query-messages"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Bagel before 2.5.5 Unsandboxed DuckDB SQL Execution via query_messages"
}