Code Injection in mcp-contextforge-gateway (CVE-2026-53710)
Summary
Code injection in mcp-contextforge-gateway (CVE-2026-53710). Successful exploitation can lead to full system takeover. Exploitable via f855e54d5b7bc1c91b977574a03b91eff6b86bb6. Mitigation: upgrade to 1.0.2 or later.
Original description
The description as published by the source.
Commit: f855e54d5b7bc1c91b977574a03b91eff6b86bb6
Component: mcp-servers/python/python_sandbox_server/src/python_sandbox_server/server_fastmcp.py
Vulnerability
RestrictedPython's sandbox in ContextForge's python_sandbox_server sub-project allows arbitrary Python execution via three compounding weaknesses:
- Raw
getattris exposed insafe_builtins, bypassing_getattr_mediation. validate_codechecks for literal dangerous dunder strings, but the payload constructs those names at runtime.- The
execute_codeMCP tool can be exposed over HTTP/SSE transport with no authentication layer.
Proof of Concept
The local PoC was executed against the real pinned sandbox code path. It constructs dunder names at runtime, walks Python's class hierarchy through the exposed getattr, finds subprocess.Popen, and executes a harmless marker command.
Transcript excerpt:
POC: IBM/mcp-context-forge RestrictedPython getattr sandbox bypass
validation={'valid': True, 'message': 'Code passed validation', 'warnings': None}
success=True
stdout="FOUND_POPEN\nb'IBM_SANDBOX_POC_PASS'\n"
IBM_RESTRICTEDPYTHON_GETATTR_POPEN_REPRO_PASS
PoC artifact hashes:
beb2d856c5a1b7c10005c9c0fccaf3d491d4fbcc2a69bc54b5e95c5730c0874b run.py
1037dcb4f0831a3c96ca728527f939af1d3e19514b23ef54f663707875748ff8 run.sh
7026e676ee31916886f10feed959ffdbe486fda05b17421387e4717acbf90ba6 transcript.txt
Production Deployment Context
ContextForge's documentation des…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-53710 has been found in mcp-contextforge-gateway.
Attackers can target a specific entry point like f855e54d5b7bc1c91b977574a03b91eff6b86bb6 over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 10.0/10.
What to do: upgrade mcp-contextforge-gateway to 1.0.2 or later.
If unsure, ask your IT team or search "mcp-contextforge-gateway CVE-2026-53710" on the vendor's site.
CVE-2026-53710 (mcp-contextforge-gateway) — CWE-94 / CVSS v3 10.0
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: f855e54d5b7bc1c91b977574a03b91eff6b86bb6 / python_sandbox_server / getattr / safe_builtins
Patched: 1.0.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in mcp-contextforge-gateway. Attackers reach the vulnerable code path via f855e54d5b7bc1c91b977574a03b91eff6b86bb6 without authentication.
Check the vendor advisory for the affected versions of mcp-contextforge-gateway. Attack surface: f855e54d5b7bc1c91b977574a03b91eff6b86bb6 / python_sandbox_server / getattr / safe_builtins.
Severity: Critical (CVSS 10.0/10). Successful exploitation can lead to full system takeover.
Update to 1.0.2.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'mcp-contextforge-gateway' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'mcp-contextforge-gateway' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
mcp-contextforge-gatewayを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade mcp-contextforge-gateway to 1.0.2ステージング環境で 1.0.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web github.com
- web security-advisories@github.com