Code Injection in qwed (CVE-2026-55585)
Summary
Code injection in qwed (CVE-2026-55585). Successful exploitation can lead to full system takeover. Exploitable via POST /verify/math. Mitigation: upgrade to 5.1.2 or later.
Original description
The description as published by the source.
Summary
The qwed package (version 5.1.1) passes attacker-controlled input directly to SymPy's parse_expr() function without a restricted namespace. Because parse_expr() 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/qwed_new/api/main.py:442 defines the /verify/math route, protected only by get_current_tenant (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)(\()', r'\1*\2', expression)) that performs no security validation. The normalized string is then passed directly to parse_expr() at line 504:
# src/qwed_new/api/main.py
expression = request.get("expression")
...
expression_normalized = re.sub(r'(\d)(\()', r'\1*\2', expression)
...
parsed = parse_expr(expression_normalized) # line 504 — unsandboxed eval
Secondary sink — POST /verify/batch
src/qwed_new/api/main.py:1481 defines the `/verify/…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-55585 has been found in qwed.
Attackers can target a specific entry point like POST /verify/math over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.8/10.
What to do: upgrade qwed to 5.1.2 or later.
If unsure, ask your IT team or search "qwed CVE-2026-55585" on the vendor's site.
CVE-2026-55585 (qwed) — CWE-94 / CVSS v3 8.8
Attack vector: remote (network-reachable) / no user interaction
Attack surface: POST /verify/math / POST /verify/batch / POST /auth/signup / POST /auth/api-keys
Patched: 5.1.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in qwed. Attackers reach the vulnerable code path via POST /verify/math.
Check the vendor advisory for the affected versions of qwed. Attack surface: POST /verify/math / POST /verify/batch / POST /auth/signup / POST /auth/api-keys.
Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover.
Update to 5.1.2.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual POST /verify/math requests with malformed payloads or SQL meta-characters. Run grep -r 'qwed' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'qwed' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
qwedを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'POST /verify/math' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
POST /verify/mathへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply patch patch
Upgrade qwed to 5.1.2ステージング環境で 5.1.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
4Post-deployment verification verify
Replay attack against POST /verify/math on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。