Summary
Open WebUI: Any authenticated user can stall a worker via a knowledge-search pattern that backtracks catastrophically
The built-in knowledge search tools let a chat participant choose the 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 anywhere on that path. A single crafted pattern and a single short line of matching text pin one CPU core for as long as the attacker wants, and because the search runs synchronously inside the event loop, that worker serves nobody else while it spins.
Preconditions
- Default configuration. The knowledge builtin tool group is enabled by default, and with
ENABLE_KB_EXECat its default ofFalsethe model is handedgrep_knowledge_files, which is the affected path. - Any authenticated user, no elevated role and no workspace permission.
- One file the attacker can read.
USER_PERMISSIONS_CHAT_FILE_UPLOADdefaults to true and a user always has read access to their own upload, so both halves of the input are attacker-supplied. - A model willing to call the tool with the attacker's literal pattern. This is the one non-deterministic step: it is reliable in practice by instructing the model in your own chat, but it is not guaranteed on a given turn.
- Deployments running with
UVICORN_WORKERSat its default of 1 lose the whole instance; multi-worker deployments lose one worker per request.
Root cause
backend/open_webui/tools/knowledge_fs.py,build_matcher: compiled the caller's pattern and returned an unbounded match function.backend/open_webui/tools/builtin.py,grep_knowledge_files: the default-configuration caller, which ran that matcher over every line of every reachable file.
build_matcher treated any pattern containing regex metacharacters as a regex, so no explicit flag was needed to reach the compiler. From there the only limits in place were on results, not on work: a cap on matches returned and a cap on files scanned, neither of which bounds the time a single line can consume. Backtracking cost is exponential in the length of the matched text rather than in the pattern, so capping pattern length or line length would not have bounded it either. The engine had no timeout available and none was imposed elsewhere.
Proof of concept
Against a real instance as an ordinary user:
- Upload a text file whose content is a single line of 30
xcharacters, and noy. - In a chat on a model with the knowledge tools available, instruct the model to call
grep_knowledge_fileswith the pattern(x|x)*yand that file's id. - The request never returns. The worker's CPU sits at 100% for the duration, and concurrent requests from other users on the same worker do not complete.
Growth measured directly against build_matcher on the vulnerable code:
| subject length | time |
|---|---|
| 16 | 4.7ms |
| 20 | 73ms |
| 24 | 1.21s |
| 28 | 19.3s |
| 30 | 73.9s |
Credits
@Classic298, for the finding and the fix.
Impact
Availability, against every other user of the affected worker. Cost scales exponentially with the length of the matching text: measured on the vulnerable code, a 24 character subject takes 1.2s, 28 takes 19s and 30 takes 74s, and a 40 character subject extrapolates to roughly a day of CPU. The same subject against a literal pattern takes under a microsecond. There is no confidentiality or integrity effect, and no data is read or altered.
A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use. Typical impact: denial of service when input is crafted to trigger backtracking.
CVE-2026-70493 has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.11.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in 0.11.0 by https://github.com/open-webui/open-webui/pull/27471. Pattern matching moved from re to the regex engine, which supports a per-search timeout, and every tool call now runs its searches under a single 2 second matching budget, after which the tool returns an error instead of continuing to match. Upgrading is sufficient; there is nothing an operator has to configure.
Frequently Asked Questions
- What is CVE-2026-70493? CVE-2026-70493 is a medium-severity inefficient regular expression (ReDoS) vulnerability in open-webui (pip), affecting versions >= 0.9.6, < 0.11.0. It is fixed in 0.11.0. A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use.
- How severe is CVE-2026-70493? CVE-2026-70493 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of open-webui are affected by CVE-2026-70493? open-webui (pip) versions >= 0.9.6, < 0.11.0 is affected.
- Is there a fix for CVE-2026-70493? Yes. CVE-2026-70493 is fixed in 0.11.0. Upgrade to this version or later.
- Is CVE-2026-70493 exploitable, and should I be worried? Whether CVE-2026-70493 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-70493 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-70493? Upgrade
open-webuito 0.11.0 or later.