CVE-2026-70493: Open WebUI: Any authenticated user can stall a worker via a knowledge-search pattern that backtracks catastrophically
Open WebUI 0.9.6 up to 0.10.x lets any signed-in user freeze a worker with a catastrophic-backtracking regex passed to the built-in knowledge search tool. With the default single worker, the whole instance stops responding. Upgrade to 0.11.0.
Published Aug 4, 2026 · Analysis Oct 25, 2026
What an attacker can do
grep_knowledge_files in backend/open_webui/tools/builtin.py lets a chat participant pick the pattern used to grep knowledge files. build_matcher in backend/open_webui/tools/knowledge_fs.py compiles any pattern with regex metacharacters using Python's backtracking re engine and runs it against every line of every reachable file. The search runs synchronously inside the event loop with no time limit. Existing caps limit results and files scanned, not time per line.
The attacker needs only an ordinary account and one file they can read, such as their own upload (USER_PERMISSIONS_CHAT_FILE_UPLOAD defaults to true). They upload a file with one line of 30 x characters and tell the model to call grep_knowledge_files with (x|x)*y. The request never returns and the CPU stays at 100%. Cost grows exponentially with the text: 24 characters take 1.2 s, 28 take 19 s, 30 take 74 s.
The one uncertain step is that the model must pass the literal pattern. The reporter says instructing it in your own chat works in practice. With UVICORN_WORKERS at 1, the whole instance goes down; with several workers, one worker per request. Nothing is read or altered.
Who is affected
Open WebUI >= 0.9.6, < 0.11.0 in default configuration: the knowledge builtin tool group is on, and ENABLE_KB_EXEC is False, which hands the model grep_knowledge_files. Check the version:
pip show open-webuiInstances with a single Uvicorn worker, the default, are hit hardest.
open-webui
- Ecosystem
- PyPI
- Affected
- >= 0.9.6, < 0.11.0
- Fixed in
- 0.11.0
- Check
pip show open-webui
How to fix it
Upgrade to 0.11.0:
pip install --upgrade open-webui==0.11.0Pull request 27471 moves matching from re to the regex engine, which supports a per-search timeout. Each tool call now runs its searches under one 2 second matching budget and then returns an error. Operators need configure nothing. Running more than one Uvicorn worker limits the blast radius, but it does not stop the stall.
How to tell if you were hit
A worker pinned at 100% CPU with requests that never complete, while other users' requests stall, matches this. Check chat logs and tool-call records for grep_knowledge_files calls with nested-quantifier patterns such as (x|x)*y, and for uploaded files containing a single long run of repeated characters. Restarting the worker frees it until the next call.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
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.
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.
Fix
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.
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.
Credited to Classic298.
Questions
- Does CVE-2026-70493 need special permissions?
No. Any authenticated user can do it with a file they uploaded themselves. No elevated role or workspace permission is required.
- Why does it depend on the model?
The model must call the tool with the attacker's literal pattern. The advisory calls that the one non-deterministic step: reliable in practice when you instruct it in your own chat, but not guaranteed on a given turn.
- Does it leak or change data?
No. The advisory states there is no confidentiality or integrity effect. It is an availability problem for users on the same worker.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
