{"id":"CVE-2026-53710","published":"2026-09-15T16:47:41Z","modified":"2026-09-15T19:45:23Z","title":"MCP Context Forge: RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server","vendor":"IBM","product":"mcp-context-forge","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01141,"percentile":0.67442,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-693","name":"Protection Mechanism Failure"}],"references":[{"url":"https://github.com/IBM/mcp-context-forge/security/advisories/GHSA-xm98-3vcf-fph7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/IBM/mcp-context-forge/commit/63a2900e6301b9c8a483a38d3737a1beb3a7ce89","tags":["x_refsource_MISC"]},{"url":"https://github.com/IBM/mcp-context-forge/releases/tag/v1.0.2","tags":["x_refsource_MISC"]}],"priority":{"score":20.5,"factors":[{"name":"EPSS percentile","points":13.49},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"ibm","affectedVersions":[{"vendor":"IBM","product":"mcp-context-forge","versions":["< 1.0.2"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-09-15T19:16:37.898454Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mcp-contextforge-gateway","vulnerableRanges":["<1.0.2"],"patched":["1.0.2"],"from":["GHSA-xm98-3vcf-fph7","PYSEC-2026-3862"],"provenance":"source"}],"summary":{"text":"The python_sandbox_server subcomponent of IBM's mcp-context-forge (prior to 1.0.2) exposes a raw getattr builtin and omits a required guard, so its RestrictedPython sandbox can be escaped through the execute_code MCP tool. An attacker able to submit code to this tool can build dunder names at runtime to reach subprocess.Popen and run OS commands with the server process's privileges, with no authentication required when the HTTP/SSE transport is enabled, whereas stdio-only deployments have reduced network reachability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:09:49Z"},"euvd":{"id":"EUVD-2026-78933","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ibm-mcp-context-forge-cve-2026-53708","children":[{"from":"CVE-2026-53710","to":"CVE-2026-53708","relation":"successor","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:mcp-contextforge-gateway","fromFixed":"1.0.2","toFixed":"1.0.3","daysApart":-1},{"kind":"same-code","provenance":"machine","files":[".secrets.baseline"],"commits":["https://github.com/IBM/mcp-context-forge/commit/fba11a99babd80779fa05510b35fb6a153bbacaf","https://github.com/IBM/mcp-context-forge/commit/63a2900e6301b9c8a483a38d3737a1beb3a7ce89"],"basis":"rarely changed file"}]},{"from":"CVE-2026-53710","to":"CVE-2026-53709","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":[".secrets.baseline"],"commits":["https://github.com/IBM/mcp-context-forge/commit/2af690f894b6e35f5f21190fdab1505f023a5272","https://github.com/IBM/mcp-context-forge/commit/63a2900e6301b9c8a483a38d3737a1beb3a7ce89"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-53710","published":"2026-09-15","fixed":"1.0.2","kev":false},{"cve":"CVE-2026-53708","published":"2026-09-14","fixed":"1.0.3","kev":false}],"package":"PyPI:mcp-contextforge-gateway"}}