High, CVSS 8.8PyPIPublished
qwed Vulnerable to Authenticated Remote Code Execution via Unsafe SymPy parse_expr()
CVE-2026-55585 · GHSA-q27q-98j4-9pfv
- Affected
- PyPI qwed < 5.1.2
- Fixed in
- 5.1.2· Vendor fix available
- Issue
- The qwed package (version 5.1.1) passes attacker-controlled input directly to SymPy's parseexpr() function without a restricted namespace. Because parseexpr() internally calls Python's eval(), any authenticated tenant can execute arbitrary Python code inside the API server process. The attack requires only a standard user account, which is freely obtainable through the default-enabled /auth/signup endpoint. Successful exploitation gives the attacker full read/write access to the filesystem and the ability to execute operating system commands, resulting in complete server compromise. Details The vulnerability exists in two independently reachable code paths: Primary sink — POST /verify/math src/qwednew/api/main.py:442 defines the /verify/math route, protected only by getcurrenttenant (line 444), which accepts any valid tenant API key. The request body field expression is read at line 463 and passed through a cosmetic regex normalization at line 495 (re.sub(r'(\d)(\()',…
Recommended action: Upgrade to 5.1.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.