VAITP Dataset

← Back to the dataset

CVE-2026-70493

ReDoS vulnerability in Open WebUI knowledge search causes Denial of Service.

  • CVSS 6.5
  • 1333
  • Resource Management
  • Remote

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.

CWE
1333
CVSS base score
6.5
Published
2026-08-04
OWASP
A04 Insecure Design
Orthogonal defect classification
Algorithm
Code defect classification
Missing Check
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Open WebUI
Fixed by upgrading
Yes

Solution

Upgrade to Open WebUI version 0.11.0.

Vulnerable code sample

import re
import os
from typing import List


def knowledge_search(query: str, file_paths: List[str]) -> List[str]:
    """Grep knowledge files for a chat-provided pattern."""
    matches = []
    for file_path in file_paths:
        try:
            with open(file_path, "r", encoding="utf-8") as f:
                for line in f:
                    # VULNERABLE: user-controlled regex compiled with backtracking engine, no limit (ReDoS)
                    if re.search(query, line, re.IGNORECASE):
                        matches.append(
                            f"Found in {os.path.basename(file_path)}: {line.strip()}"
                        )
        except Exception:
            pass
    return matches

Patched code sample

import re
import os
from typing import List


def knowledge_search(query: str, file_paths: List[str]) -> List[str]:
    """Grep knowledge files for a chat-provided pattern."""
    # FIX: escape metacharacters so the pattern is matched literally, no backtracking
    pattern = re.compile(re.escape(query), re.IGNORECASE)
    matches = []
    for file_path in file_paths:
        try:
            with open(file_path, "r", encoding="utf-8") as f:
                for line in f:
                    if pattern.search(line):
                        matches.append(
                            f"Found in {os.path.basename(file_path)}: {line.strip()}"
                        )
        except Exception:
            pass
    return matches

Payload

(x|x)*y

Cite this entry

@misc{vaitp:cve202670493,
  title        = {{ReDoS vulnerability in Open WebUI knowledge search causes Denial of Service.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-70493},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-70493/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::