{"id":2212,"cve":"CVE-2026-70493","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-70493\/","cwe":"CWE-1333","cwe_number":1333,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/1333","cvss_score":6.5,"published":"2026-08-04","owasp":"A04 Insecure Design","odc":"Algorithm","cdc":"Missing Check","category":"Resource Management","subcategory":"Resource Exhaustion","scope":"Remote","impact":"Denial of Service (DoS)","summary":"ReDoS vulnerability in Open WebUI knowledge search causes Denial of Service.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-70493\/","description":"Open WebUI is an extensible, feature-rich, and user-friendly self-hosted AI platform. From 0.9.6 until 0.11.0, the built-in knowledge search path in backend\/open_webui\/tools\/knowledge_fs.py and backend\/open_webui\/tools\/builtin.py let a chat participant choose a pattern used to grep knowledge files. Patterns containing regex metacharacters were compiled with Python's backtracking re engine and run against every line of every reachable file with no time limit, so a crafted pattern such as (x|x)*y and one matching uploaded file line can pin one CPU core and block the event loop. This causes availability impact for every other user of the affected worker. This issue is fixed in 0.11.0.","solution":"Upgrade to Open WebUI version 0.11.0.","affected_component":"Open WebUI","fixed_by_upgrading":true,"vulnerable_code":"import re\nimport os\nfrom typing import List\n\n\ndef knowledge_search(query: str, file_paths: List[str]) -> List[str]:\n    \"\"\"Grep knowledge files for a chat-provided pattern.\"\"\"\n    matches = []\n    for file_path in file_paths:\n        try:\n            with open(file_path, \"r\", encoding=\"utf-8\") as f:\n                for line in f:\n                    # VULNERABLE: user-controlled regex compiled with backtracking engine, no limit (ReDoS)\n                    if re.search(query, line, re.IGNORECASE):\n                        matches.append(\n                            f\"Found in {os.path.basename(file_path)}: {line.strip()}\"\n                        )\n        except Exception:\n            pass\n    return matches\n","patched_code":"import re\nimport os\nfrom typing import List\n\n\ndef knowledge_search(query: str, file_paths: List[str]) -> List[str]:\n    \"\"\"Grep knowledge files for a chat-provided pattern.\"\"\"\n    # FIX: escape metacharacters so the pattern is matched literally, no backtracking\n    pattern = re.compile(re.escape(query), re.IGNORECASE)\n    matches = []\n    for file_path in file_paths:\n        try:\n            with open(file_path, \"r\", encoding=\"utf-8\") as f:\n                for line in f:\n                    if pattern.search(line):\n                        matches.append(\n                            f\"Found in {os.path.basename(file_path)}: {line.strip()}\"\n                        )\n        except Exception:\n            pass\n    return matches\n","payload_needed":true,"payload":"```\n(x|x)*y\n```","payload_status":"available","published_fix":[{"repository":"open-webui\/open-webui","commit_url":"https:\/\/github.com\/open-webui\/open-webui\/commit\/3ab2026262ef6f09810e4d235c5f9a9cb903e595","commit_subject":"fix: bound knowledge-search matching so one pattern cannot stall the worker (#27471)","units":[{"file":"backend\/open_webui\/tools\/knowledge_fs.py","function":null},{"file":"backend\/open_webui\/tools\/knowledge_fs.py","function":"build_matcher"},{"file":"backend\/open_webui\/tools\/knowledge_fs.py","function":"kb_exec"}]}],"references":null}