CVE-2026-55585
QWED: Authenticated Remote Code Execution via Unsafe SymPy `parse_expr()`
Also known as GHSA-q27q-98j4-9pfv, PYSEC-2026-3914
Mitigation
- Upgrade qwed to 5.1.2 or later.
Who should check
- Projects that depend on PyPI package qwed (< 5.1.2)
- Anyone running QWED-AI qwed-verification < 5.1.2
Vulnerability facts
- Affected
- qwed < 5.1.2
- Fixed in
- 5.1.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.78% chance of exploitation in 30 days (percentile 52, 2026-11-26)
- CWE
- CWE-94
- Modified
Description
QWED is open-source AI verification infrastructure for deterministic verification of LLM outputs, tool calls, code, schemas, and agent state before production execution. Prior to 5.1.2, the qwed package passes caller-controlled math expressions directly to SymPy parse_expr() without restricted global_dict and local_dict namespaces, allowing Python eval() to resolve builtins and execute arbitrary Python code in the API server process. In src/qwed_new/api/main.py, POST /verify/math is protected by get_current_tenant but accepts any valid tenant API key, reads the expression field, applies only a cosmetic re.sub(r'(\d)(()', r'\1*\2', expression) normalization, and passes the result to parse_expr(). In src/qwed_new/core/batch.py, POST /verify/batch sends math items through batch_service.create_job(), stores item.query verbatim, and _verify_item() passes VerificationType.MATH input to parse_expr() without sanitization. The default-enabled POST /auth/signup endpoint allows anyone to create a standard tenant account, POST /auth/api-keys issues an x-api-key, and either vulnerable path can then be used to read or write files, modify data, execute operating system commands, terminate the service, and compromise other tenants in a shared deployment. This issue is fixed in version 5.1.2.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-55585. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-55585.md Affected: qwed < 5.1.2 Fixed in: 5.1.2 Steps: 1. Search this machine and project for qwed (PyPI), QWED-AI qwed-verification: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2026-55585 being exploited?
There is no confirmed exploitation: CVE-2026-55585 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.78% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-55585?
High: CVSS 8.8 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2026-55585?
qwed < 5.1.2.
Is there a fix for CVE-2026-55585?
Yes. Fixed in 5.1.2. Upgrade qwed to 5.1.2 or later.
How do I check if I'm affected by CVE-2026-55585?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.