AAK-MCPCALC-CVE-2026-44717-PIN-001: MCP Calculate Server eval() RCE (CVE-2026-44717, PyPI below 0.1.1)
- Severity
- CRITICAL
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/supply_chain.py- Auto-fixable
- No.
- SARIF name
McpCalculateServerEvalRce
What it detects
The PyPI package mcp-calculate-server <0.1.1 has a remote code execution vulnerability in its MCP tool handler — the math expression is routed through eval() (SymPy-backed without local_dict / global_dict namespace pinning), so an attacker controlling the tool input reaches host RCE. CVE-2026-44717 (CVSS 9.8 CRITICAL, NVD 2026-05-15). Patched in 0.1.1 (latest at AAK ship time: 1.0.0). This pin-only rule fires on the package in any Python manifest (requirements*.txt, pyproject.toml, Pipfile*, poetry.lock, uv.lock). A broader source-detector for the unsafe-eval() shape inside any @tool / @mcp.tool() decorated handler is queued for v0.3.19+ — it would catch single-author MCP servers with the same shape, not just this product.
How to fix
Bump mcp-calculate-server to >= 0.1.1 (or the latest 1.x). If you maintain a similar MCP server, replace eval() with ast.literal_eval for plain numerics, or SymPy parse_expr(expr, local_dict={}, global_dict={}, evaluate=True) with explicit allow-listed symbol tables.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCPCALC-CVE-2026-44717-PIN-001
Limitations
Matches mcp-calculate-server followed directly by a version (mcp-calculate-server==0.1.0) in requirements*.txt at the project root and in a dependency string of the root pyproject.toml. A name with no version, a git URL, the table form that Poetry and Pipfile use (mcp-calculate-server = "^0.1.0"), a requirements file in a sub-directory and an .mcp.json launcher are not reported. Pipfile.lock, poetry.lock and uv.lock are opened but never match, because the name and the version sit on separate lines, so a version that reaches the project only through a lockfile is not reported. A file over 2 MB, or a lockfile over 32 MiB, is not read.
References
- CVE: CVE-2026-44717
- 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))
- Incidents and advisories: NVD-CVE-2026-44717
- CSA AI Controls Matrix (AICM): AIS-08, STA-08, IVS-04
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-MCPCALC-CVE-2026-44717-PIN-001.md: the page then shows that text, with the registry reference appended under it.