AAK-MCP-QWED-CVE-2026-55546-001: QWED-MCP evaluates a tool argument through SymPy parse_expr (below 0.2.1)
- Severity
- CRITICAL
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
QwedMcpParseExprRce
What it detects
QWED-MCP, a deterministic verification gateway for MCP, before 0.2.1 passes the attacker-controlled expression and claimed_result arguments of verify_math_expression() (src/qwed_mcp/engines/math_engine.py) straight into SymPy's parse_expr() after only rewriting ^ to **. No global_dict/local_dict pinning, no removal of builtins and no AST validation, and parse_expr() evaluates through eval(), so a tool call reaches arbitrary code execution with the server's privileges (CVE-2026-55546, CWE-94, CVSS 3.1 9.8). Fixed in 0.2.1. The source shape of this defect is already reported by AAK-MCP-TOOL-UNSAFE-EVAL-001, which names unpinned parse_expr explicitly and fires on this handler; this pin adds the dependency surface, so a project that consumes the package without vendoring its source is covered too.
How to fix
Upgrade qwed-mcp to >= 0.2.1 and pin it. If you maintain a comparable verifier, do not reach for a denylist of dangerous names: call parse_expr(expr, global_dict={}, local_dict=<allowed symbols>, evaluate=True) with an explicit symbol allow-list, and bound input length and character set before parsing.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-QWED-CVE-2026-55546-001
Limitations
Reads qwed-mcp in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (services/api/pyproject.toml), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (pdm.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-55546
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-RCE-04
- CSA AI Controls Matrix (AICM): AIS-08, IVS-04, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-QWED-CVE-2026-55546-001.md: the page then shows that text, with the registry reference appended under it.