mcp-contextforge-gateway has RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server
- Product
- mcp-contextforge-gateway
- CVE
- CVE-2026-53710
- Affected
- mcp-contextforge-gateway <= 1.0.1
- Fixed in
- 1.0.2
Last verified against sources: October 26, 2026
Am I affected?
mcp-contextforge-gateway: affected mcp-contextforge-gateway <= 1.0.1. Fixed in 1.0.2.
- Check your version: run
pip show mcp-contextforge-gateway. Versions <= 1.0.1 of mcp-contextforge-gateway are affected. [1]
What to do now
- Upgrade to the fixed version: run
pip install --upgrade "mcp-contextforge-gateway>=1.0.2"(first patched version 1.0.2). [1] - Add authentication to HTTP transport for all
tools/callrequests. [1]
General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.
What happened
- RestrictedPython's sandbox in ContextForge's
python_sandbox_serversub-project allows arbitrary Python execution via three compounding weaknesses. [1] - Raw
getattris exposed insafe_builtins, bypassing_getattr_mediation. [1] validate_codechecks for literal dangerous dunder strings, but the payload constructs those names at runtime. [1]- The
execute_codeMCP tool can be exposed over HTTP/SSE transport with no authentication layer. [1]
Impact
- An attacker with access to the
python_sandbox_serverHTTP endpoint can execute OS commands with the privileges of the server process. [1] - In containerized deployments with host mounts or internal network reachability, this can become filesystem compromise or network pivoting from the gateway host. [1]
What was done
Sources
- GHSA-xm98-3vcf-fph7 — GitHub Advisory Database
Every statement above was checked against these sources before publishing. Spotted an error? Tell us and we will correct it with a dated note.
Share advisory brief with your team
Copy a plain-text summary for Slack, GitHub issues, or team security channels.
[CVE-2026-53710] mcp-contextforge-gateway has RestrictedPython sandbox bypass via getattr builtin in python_sandbox_server
Product: mcp-contextforge-gateway | Affected: mcp-contextforge-gateway <= 1.0.1 | Fixed in: 1.0.2
Summary: RestrictedPython's sandbox in ContextForge's `python_sandbox_server` sub-project allows arbitrary Python execution via three compounding weaknesses.
Source & remediation on AgentArmorHQ: https://agentarmorhq.com/incidents/2026/08/cve-2026-53710-mcp-contextforge-gatewayCorrections
Report an error or request a correction. We review requests within 5 business days and add a dated correction note.
Discussions for CVE-2026-53710
Ask questions or share configuration tips. Governed by our Community Rules & Terms.
No posts match this filter yet.
Be the first to ask a question or share a working tip.