Code Injection in qwed-mcp (CVE-2026-55546)
Summary
Code injection in qwed-mcp (CVE-2026-55546). Successful exploitation can lead to full system takeover. Exploitable via global_dict. Mitigation: upgrade to 0.2.1 or later.
Original description
The description as published by the source.
Summary
verify_math_expression() in qwed-mcp v0.2.0 passes attacker-controlled strings directly to SymPy's parse_expr() without restricting global_dict or validating the expression's AST. Because parse_expr() internally calls eval() and Python automatically injects the current module's __builtins__ when no explicit restriction is set, an attacker can embed arbitrary Python expressions — including __import__('os').system(...) — to execute OS commands in the context of the running process. Confirmed exploitation in a Docker container yields root-level arbitrary command execution with no authentication or special configuration required.
Details
The vulnerability resides in src/qwed_mcp/engines/math_engine.py. The public function verify_math_expression(expression, claimed_result, operation) accepts both the expression and claimed_result arguments as raw strings and passes them — after a trivial ^ → ** substitution — to sympy.parsing.sympy_parser.parse_expr():
# math_engine.py:50-54
expr = parse_expr(
expression.replace("^", "**"),
local_dict={"x": x, "y": y, "z": z, "pi": pi, "e": E},
transformations=transformations
)
# math_engine.py:64-68
claimed = parse_expr(
claimed_result.replace("^", "**"),
local_dict={"x": x, "y": y, "z": z, "pi": pi, "e": E},
transformations=transformations
)
local_dict only adds math symbols to the evaluation namespace; it does not remove __builtins__.…
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-55546 has been found in qwed-mcp.
Attackers can target a specific entry point like global_dict over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 9.8/10.
What to do: upgrade qwed-mcp to 0.2.1 or later.
If unsure, ask your IT team or search "qwed-mcp CVE-2026-55546" on the vendor's site.
CVE-2026-55546 (qwed-mcp) — CWE-94 / CVSS v3 9.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: global_dict / __builtins__ / expression / claimed_result
Patched: 0.2.1 — 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 qwed-mcp. Attackers reach the vulnerable code path via global_dict without authentication.
Check the vendor advisory for the affected versions of qwed-mcp. Attack surface: global_dict / __builtins__ / expression / claimed_result.
Severity: Critical (CVSS 9.8/10). Successful exploitation can lead to full system takeover.
Update to 0.2.1.
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 'qwed-mcp' . 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 'qwed-mcp' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
qwed-mcpを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade qwed-mcp to 0.2.1ステージング環境で 0.2.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。