Skip to content
Heist/ feed
Back to feed
Critical

MCP Context Forge: RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server

Type: advisorySources: OSV

MCP Context Forge is an AI gateway, registry, and proxy for MCP, A2A, REST, and gRPC APIs. Prior to 1.0.2, the python_sandbox_server in mcp-servers/python/python_sandbox_server/src/python_sandbox_server/server_fastmcp.py exposes raw getattr through safe_builtins, omits a required _getattr_ guard, and relies on validate_code checks for literal dangerous dunder strings. An attacker can construct dunder names at runtime, traverse the Python class hierarchy, reach subprocess.Popen, and execute OS commands with the server process privileges through the execute_code MCP tool. The HTTP/SSE transport can expose this tool without authentication, while stdio-only deployments have reduced network reachability. The issue affects the python_sandbox_server subproject and does not directly affect the core Context Forge gateway or proxy components. This issue is fixed in version 1.0.2.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-53710
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 03:28 UTC · Revision 1

Source evidence

MCP Context Forge: RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server

core-osv · Original source

Published 15 Sept 2026, 16:47 UTC

MCP Context Forge is an AI gateway, registry, and proxy for MCP, A2A, REST, and gRPC APIs. Prior to 1.0.2, the python_sandbox_server in mcp-servers/python/python_sandbox_server/src/python_sandbox_server/server_fastmcp.py exposes raw getattr through safe_builtins, omits a required _getattr_ guard, and relies on validate_code checks for literal dangerous dunder strings. An attacker can construct dunder names at runtime, traverse the Python class hierarchy, reach subprocess.Popen, and execute OS commands with the server process privileges through the execute_code MCP tool. The HTTP/SSE transport can expose this tool without authentication, while stdio-only deployments have reduced network reachability. The issue affects the python_sandbox_server subproject and does not directly affect the core Context Forge gateway or proxy components. This issue is fixed in version 1.0.2.

osv:CVE-2026-53710
Complete source record
{
  "id": "08cfbc2257c74cc112b5e6fd509388e7cdc9e3c7cfc4c10a87704fb9a9835c8d",
  "url": "https://osv.dev/vulnerability/CVE-2026-53710",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "MCP Context Forge: RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server",
    "summary": "MCP Context Forge is an AI gateway, registry, and proxy for MCP, A2A, REST, and gRPC APIs. Prior to 1.0.2, the python_sandbox_server in mcp-servers/python/python_sandbox_server/src/python_sandbox_server/server_fastmcp.py exposes raw getattr through safe_builtins, omits a required _getattr_ guard, and relies on validate_code checks for literal dangerous dunder strings. An attacker can construct dunder names at runtime, traverse the Python class hierarchy, reach subprocess.Popen, and execute OS commands with the server process privileges through the execute_code MCP tool. The HTTP/SSE transport can expose this tool without authentication, while stdio-only deployments have reduced network reachability. The issue affects the python_sandbox_server subproject and does not directly affect the core Context Forge gateway or proxy components. This issue is fixed in version 1.0.2.",
    "evidence": "osv:CVE-2026-53710",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-53710",
      "aliases": [
        "CVE-2026-53710",
        "GHSA-xm98-3vcf-fph7",
        "PYSEC-2026-3862"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ibm/mcp-context-forge",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e0967e65cd381374682751da630e2cc2fb3a9c34"
                },
                {
                  "fixed": "63a2900e6301b9c8a483a38d3737a1beb3a7ce89"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.0.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "63a2900e6301b9c8a483a38d3737a1beb3a7ce89"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e0967e65cd381374682751da630e2cc2fb3a9c34"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.0.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.0.1",
            "v1.0.0",
            "v1.0.0-RC-3",
            "v1.0.0-RC2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53710.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:53.324414969Z",
      "provider": "osv",
      "references": [
        "https://github.com/IBM/mcp-context-forge/releases/tag/v1.0.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53710.json",
        "https://github.com/IBM/mcp-context-forge/security/advisories/GHSA-xm98-3vcf-fph7",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-53710",
        "https://github.com/IBM/mcp-context-forge/commit/63a2900e6301b9c8a483a38d3737a1beb3a7ce89"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-693",
          "CWE-94"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53710.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-53710",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 522207,
  "published_at": "2026-09-15T16:47:41.085+00:00"
}