OPEN-WEBUI · CVE-2026-109298 · AI agents & MCP
FIX → 0.11.4
Open WebUI's built-in knowledge grep tool compiles a user-supplied regular expression that can expand into hundreds of megabytes of memory, and the compiled pattern stays cached for the life of the process. An authenticated user can repeatedly send such patterns to make the worker run out of memory and stall other users.
first public Sep 27, 2026 · 2 sources
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Teams running Open WebUI releases 0.11.0 through 0.11.3 with the default knowledge tools, where any signed-in user can upload a file and have the model grep it with a crafted pattern. Deployments on earlier releases, or on 0.11.4 and later, are not affected. Multi-worker deployments lose one worker per request, while a single-worker default instance can lose everything.
Not affected if 0.11.4-or-later, no-authenticated-users-outside-admins, pre-0.11.0-release
Who cares open-webui, python, self-hosted
pip show open-webui and see whether it is between 0.11.0 and 0.11.3.ENABLE_KB_EXEC is left at its default False.Upgrade to 0.11.4
The built-in knowledge search tools let a chat participant choose the pattern used to grep knowledge files. That pattern is compiled before any of the limits on the search apply, and the regular expression engine expands counted repetition as it compiles, so a pattern that nests repetition counts forces it to build a structure vastly larger than the pattern itself. A pattern of a couple of dozen characters makes one worker allocate hundreds of megabytes, and because compiled patterns are cached for the life of the process, that memory is never returned. Neither the size of that work nor the number of times it can be repeated is bounded.
ENABLE_KB_EXEC at its default of False the model is handed the knowledge grep tool, which is the affected path. The chat file grep tool and the kb_exec grep command share the same pattern compiler and are affected the same way.USER_PERMISSIONS_CHAT_FILE_UPLOAD defaults to true so the attacker can supply their own.Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
0.11.4 or later.UVICORN_WORKERS at its default of 1 lose the whole instance; multi-worker deployments lose one worker per request.Availability, against every other user of the affected worker. Peak allocation grows with the fourth power of the repetition count while the pattern stays the same length, so the attacker chooses the cost by editing two digits, and the compiled result is then retained in the engine's pattern cache, which holds up to 500 entries before it evicts anything. Each distinct pattern is therefore a permanent bite out of the worker rather than a spike that unwinds: measured directly, one pattern at a repetition count of 40 retained about 740 MB, six distinct patterns at counts of 30 to 35 retained 1.38 GB together, and under a 2 GB memory limit the next compile failed with the process out of memory. A modest sequence of requests walks the process into memory exhaustion with no recovery short of a restart, and a deployment whose container memory limit sits below the peak loses the worker outright. While each compile runs, the work happens synchronously on the event loop, so the worker serves nobody else for its duration. There is no confidentiality or integrity effect, and no data is read or altered.
Fixed in 0.11.4 by https://github.com/open-webui/open-webui/commit/97e013a66169c4fcd7f26ab9e41a4ff260ffd4da. Search patterns are now compiled with RE2, which refuses oversized repetition and runs under a fixed 1 MiB memory limit for the compiled pattern, and search patterns are also capped in length. Ordinary search patterns are unaffected, though regex searches now follow RE2 syntax (no lookarounds or backreferences). Upgrading is sufficient; there is nothing an operator has to configure.
backend/open_webui/tools/knowledge_fs.py, build_matcher: compiled the caller's pattern with no limit on the result.backend/open_webui/tools/builtin.py, grep_knowledge_files: the default-configuration caller that passes an unvalidated pattern to it; grep_chat_files and the kb_exec grep command reach the same function.The earlier fix for catastrophic backtracking moved matching to an engine that supports a per-search timeout and placed every search under a shared time budget. That budget is acquired after the pattern has been compiled, so by construction it governs matching only. The replacement engine materialises counted repetition at compile time, which the previous one did not, so the migration introduced a new cost on a step that had never needed a limit before and that the budget was never positioned to cover. The pattern reached the compiler with no check beyond being non-empty. The count check added in 0.11.1 scanned the raw pattern text for repetition counts, so any spelling the engine reads as a count but the scan did not recognise went through unchecked.
Against a running instance, as a user with the default user role and no workspace permissions:
((((a{40}){40}){40}){40})|x.Observed on the vulnerable code, with the tool call driven by a stub upstream so the model's choice to call the tool is deterministic. Everything from the tool call onward is unmodified Open WebUI code. Worker memory growth and the delay seen by a concurrent request on a second connection:
| repetition count | worker memory | concurrent request delayed by |
|---|---|---|
| literal pattern | 0.1 MB | 20 ms |
| 32 | 273 MB | 219 ms |
| 40 | 612 MB | 513 ms |
The pattern is 27 bytes at every row, so limiting the length of the input does not bound the cost. The engine used before 0.11.0 compiles all of these in under a millisecond with no measurable allocation, and 0.11.4 rejects them outright.
@baeseungwon1010, for identifying that compilation runs outside the matching budget.
This page as .md · .json · CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.