# CVE-2026-55585: QWED: Authenticated Remote Code Execution via Unsafe SymPy \`parse\_expr()\`

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.78% (percentile 52, 2026-11-26)
- **CWE:** CWE-94
- **Aliases:** GHSA-q27q-98j4-9pfv, PYSEC-2026-3914
- **Published:** 2026-08-25T16:23:39.334Z
- **Modified:** 2026-09-10T12:25:35.711Z

## Who should check

- Projects that depend on PyPI package qwed (\< 5.1.2)
- Anyone running QWED-AI qwed-verification \< 5.1.2

## 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

- PyPI `qwed`: affected \< 5.1.2; fixed 5.1.2 (osv)
- QWED-AI qwed-verification: \< 5.1.2 (cvelist)

## Mitigation

- Upgrade qwed to 5.1.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/QWED-AI/qwed-verification/security/advisories/GHSA-q27q-98j4-9pfv>
- vendor: <https://github.com/advisories/GHSA-q27q-98j4-9pfv>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-55585>
- patch: <https://github.com/QWED-AI/qwed-verification/pull/200>
- patch: <https://github.com/QWED-AI/qwed-verification/commit/6066b68c0c4f4cc2c3771824822aaa864d082ef8>
- patch: <https://github.com/QWED-AI/qwed-verification/commit/dc9d4db72ca4b4ae3f96d0e6a0c27a9e38a06f61>
- other: <https://github.com/QWED-AI/qwed-verification>
- other: <https://pypi.org/project/qwed>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-55585>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-q27q-98j4-9pfv> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-3914> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-55585> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-55585>
