Medium

Open WebUI: Any authenticated user can stall a worker via a knowledge-search pattern that backtracks catastrophically

  • Disclosed: 04.08.2026
  • Updated: 11.10.2026 14:19

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_EXEC at its default of False the model is handed grep_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_UPLOAD defaults 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_WORKERS at 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:

  1. Upload a text file whose content is a single line of 30 x characters, and no y.
  2. In a chat on a model with the knowledge tools available, instruct the model to call grep_knowledge_files with the pattern (x|x)*y and that file's id.
  3. 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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) open-webui >= 0.9.6, < 0.11.0 0.11.0

References

CVSS score 6.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness (CWE)
CWE-1333
Platform
Python (PyPI)
Package
open-webui
Disclosed
04.08.2026
Updated
11.10.2026 14:19

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-3637 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-2f54-p244-32q6 - CC BY 4.0

Vulnerability history: open-webui

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (161) in the archive
Total entries
161
First → latest
08.2024 09.2026
Without a fix
11
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 77
  • Medium 75
  • Low 8

Disclosures per year

  1. 2024: 3
  2. 2025: 21
  3. 2026: 137
Severity:
  1. Open WebUI: Any authenticated user can stall a worker via a knowledge-search pattern that backtracks catastrophically this entry
    Medium · 6.5 CVE-2026-70493 >= 0.9.6, < 0.11.0 0.11.0
  2. High · 7.7 CVE-2026-59221 >= 0.9.6, < 0.10.0 0.10.0
  3. High · 7.3 CVE-2026-59214 < 0.10.0 0.10.0
  4. High · 8.7 CVE-2026-54011 < 0.9.6 0.9.6
  5. High · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
  6. High · 7.7 CVE-2026-45303 < 0.6.5 0.6.5
  7. High · 7.1 CVE-2026-44569 < 0.6.19 0.6.19
  8. High · 8.1 CVE-2026-44565 < 0.6.10 0.6.10
  9. High · 7.3 CVE-2026-44566 < 0.1.124 0.1.124
  10. High · 7.3 CVE-2026-44567 < 0.1.124 0.1.124
  11. High · 7.3 CVE-2026-44549 < 0.8.0 0.8.0
  12. Critical · 9.1 CVE-2026-44551 < 0.9.0 0.9.0
  13. High · 7.3 CVE-2026-44721 < 0.9.0 0.9.0
  14. High · 7.7 CVE-2026-34222 < 0.8.11 0.8.11
  15. High · 8.4 CVE-2024-7990 <= 0.3.8 no fix
  16. High · 8.0 CVE-2024-7806 < 0.3.33 0.3.33
  17. High · 7.6 CVE-2024-7053 <= 0.3.8 no fix
  18. High · 8.1 CVE-2024-7043 < 0.3.16 0.3.16
  19. High · 7.5 CVE-2024-7036 <= 0.3.8 no fix
  20. High · 7.5 ghsa-w466-2wfc-8g58 <= 0.3.32 no fix
  21. High · 7.5 CVE-2024-12534 <= 0.3.32 no fix
  22. High · 7.5 CVE-2024-12537 <= 0.3.32 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.