QWED-MCP: Unsafe SymPy `parse_expr()` Remote Code Execution via Unsanitized Math Expression Input
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| QWED-AI | qwed-mcp | before 0.2.1 | 0.2.1 | Patch available | CNA |
| — | qwed-mcp (PyPI) | before 0.2.1 | 0.2.1 | Patch available | GHSA-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
- 2026-10-02 Threatist record created from CVE-2026-55546
- 2026-10-03 Alias added: GHSA-mw6r-2hvm-4rp2
References
More QWED-AI vulnerabilities
- TI-2026-40124 QWED: Authenticated Remote Code Execution via Unsafe SymPy `parse_expr()` CVSS 3.1HIGH 8.8
Sources
- CVE-2026-55546 · CVE Program
- CVE-2026-55546 · NVD
- FIRST EPSS
- GHSA-mw6r-2hvm-4rp2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences