mcp-contextforge-gateway has RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server
CVE-2026-53710 · GHSA-xm98-3vcf-fph7 · published 2026-08-24 · updated 2026-10-15
- Severity
- Critical
- CVSS score
- 10.0
- Chance of exploitation (EPSS)
- 1.1%
- Fixed in
- 1.0.2
- Exploitation No known exploitation
- Automatable Yes
- Technical impact Total
- CISA SSVC
An attacker with access to the pythonsandboxserver HTTP endpoint can execute OS commands with the privileges of the server process. In containerized deployments with host mounts or internal network reachability, this can become filesystem compromise or network pivoting from the gateway host.
Upgrade mcp-contextforge-gateway to 1.0.2 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Remove raw getattr and setattr from safe_builtins, expose only policy-controlled attribute access if dynamic lookup is required, replace substring filtering with a stricter RestrictedPython policy pipeline, and add authentication to HTTP transport for all tools/call requests.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-contextforge-gateway | PyPI | <= 1.0.1 | 1.0.2 |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
- Highmcp-contextforge-gateway has Server-Side Template Injection (SSTI) leading to Remote Code Execution in `PromptService._render_template` via mcp-contextforge-gateway
- MediumContextForge: DNS TOCTOU race condition causes SSRF protection bypass (`/admin/gateways/test`)mcp-contextforge-gateway
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.