Categories
CVE-2026-53710 critical CVSS 10.0

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:

  1. Raw getattr is exposed in safe_builtins, bypassing _getattr_ mediation.
  2. validate_code checks for literal dangerous dunder strings, but the payload constructs those names at runtime.
  3. The execute_code MCP 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.

❓ What is the problem

Arbitrary code execution (CWE-94) exists in mcp-contextforge-gateway. Attackers reach the vulnerable code path via f855e54d5b7bc1c91b977574a03b91eff6b86bb6 without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of mcp-contextforge-gateway. Attack surface: f855e54d5b7bc1c91b977574a03b91eff6b86bb6 / python_sandbox_server / getattr / safe_builtins.

🔥 Severity

Severity: Critical (CVSS 10.0/10). Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 1.0.2.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

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

  1. 1
    Identify exposure identify
    grep -r 'mcp-contextforge-gateway' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で mcp-contextforge-gateway を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade mcp-contextforge-gateway to 1.0.2

    ステージング環境で 1.0.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

pip mcp-contextforge-gateway
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.2"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details