Read the docs
TI-2026-40091 Aliases CVE-2026-55546GHSA-mw6r-2hvm-4rp2

QWED-MCP: Unsafe SymPy `parse_expr()` Remote Code Execution via Unsanitized Math Expression Input

Priority HIGH 82CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

QWED-MCP is a deterministic verification gateway for MCP. Prior to 0.2.1, verify_math_expression() in src/qwed_mcp/engines/math_engine.py passes attacker-controlled expression and claimed_result strings directly to SymPy's parse_expr() after only normalizing caret syntax to Python exponent syntax, without restricting global_dict, removing Python built-ins, or validating the expression AST. Because parse_expr() calls Python's eval() with built-ins available, an attacker who can cause a downstream caller to pass untrusted input to this public library function can use Python import functionality to execute arbitrary operating-system commands as the qwed-mcp process user, read or modify accessible data, exfiltrate process secrets, or reach internal services. The default MCP tool registry does not expose verify_math_expression(), so exploitation requires a downstream integration that invokes the library API with attacker-controlled input. This issue is fixed in version 0.2.1.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00726 54th percentileScored 2026-11-07
Fix Fixed qwed-mcp (QWED-AI): 0.2.1qwed-mcp (PyPI): 0.2.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
QWED-AIqwed-mcpbefore 0.2.10.2.1Patch availableCNA
—qwed-mcp (PyPI)before 0.2.10.2.1Patch availableGHSA-mw6r-2hvm-4rp2
  • qwed-mcp VendorQWED-AI Affected before 0.2.1 Fixed in 0.2.1 Patch available CNA
  • qwed-mcp (PyPI) Vendor— Affected before 0.2.1 Fixed in 0.2.1 Patch available GHSA-mw6r-2hvm-4rp2

Remediation

  • Fix · CNA qwed-mcp (QWED-AI) Fixed in 0.2.1
  • Fix · GHSA-mw6r-2hvm-4rp2 qwed-mcp (PyPI) Fixed in 0.2.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-55546
  2. 2026-10-03 Alias added: GHSA-mw6r-2hvm-4rp2

References

  • TI-2026-40124 QWED: Authenticated Remote Code Execution via Unsafe SymPy `parse_expr()` CVSS 3.1HIGH 8.8

Sources