{"answers":{"affected":"3 open source packages ship an affected version, including qwed.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-55585 exists.","fix":"Upgrade qwed to 5.1.2 or later.","what":"CVE-2026-55585 is a high-severity code injection vulnerability in QWED-AI qwed-verification, published on 25 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-55585 and fix it if it is affected.\n\nWhat it is: CVE-2026-55585 is a high-severity code injection vulnerability in QWED-AI qwed-verification, published on 25 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-55585 exists.\n\nAffected packages and fixed versions:\n- qwed (PyPI): affected all versions; fixed in 5.1.2\n- qwed (PyPI): affected all versions; fixed in 5.1.2\n- qwed (PyPI): affected all versions; fixed in 5.1.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-55585/ (Markdown: https://insights.sbomify.com/CVE-2026-55585/index.md)","id":"CVE-2026-55585","markdown":"https://insights.sbomify.com/CVE-2026-55585/index.md","name":"CVE-2026-55585","record":{"aliases":["GHSA-q27q-98j4-9pfv","PYSEC-2026-3914"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"AI verification infrastructure","requires_auth":"low_privilege","summary":"Authenticated attackers can execute arbitrary Python code via unsafe SymPy expression parsing in QWED, leading to full system compromise.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"QWED: Authenticated Remote Code Execution via Unsafe SymPy `parse_expr()`","id":"CVE-2026-55585","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"SumatraPDF: Heap out-of-bounds write in vendored CHMLib LZX Huffman table construction reachable from crafted CHM files","id":"CVE-2026-55586"},"packages":[{"ecosystem":"PyPI","fixed":["5.1.2"],"introduced":["0"],"last_affected":[],"package":"qwed","purl":null,"source":"GHSA-q27q-98j4-9pfv"},{"ecosystem":"PyPI","fixed":["5.1.2"],"introduced":["0"],"last_affected":[],"package":"qwed","purl":"pkg:pypi/qwed","source":"GHSA-q27q-98j4-9pfv"},{"ecosystem":"PyPI","fixed":["5.1.2"],"introduced":["0"],"last_affected":[],"package":"qwed","purl":"pkg:pypi/qwed","source":"PYSEC-2026-3914"}],"prev":{"headline":"phpSysInfo: IP allowlist (PSI_ALLOWED) bypass via spoofed X-Forwarded-For / Client-IP headers","id":"CVE-2026-55584"},"products":["qwed-verification"],"published":"2026-08-25","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-28","vendors":["QWED-AI"]},"summary":"Authenticated attackers can execute arbitrary Python code via unsafe SymPy expression parsing in QWED, leading to full system compromise.","url":"https://insights.sbomify.com/CVE-2026-55585/"}