CVE-2026-59220: Open WebUI Denial of Service Vulnerability
MODERATECVE-2026-59220 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Open WebUI libraries in the PyPI ecosystem. The issue involves redos in skill-mention regexes causes whole-instance dos on default config. Remediation is available by upgrading affected packages to version 0.10.0.
CVE-2026-59220 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-59220
To remediate this vulnerability, upgrade all affected Open WebUI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install open-webui>=0.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show open-webui
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-59220, inspect your installed packages using pip:
pip show open-webui
Analyze the terminal output to locate any version of Open WebUI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.0), your application is affected.
Note: The pip show open-webui command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Open WebUI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-59220 Affected Open WebUI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
open-webui
|
PyPI |
≥ 0.9.2
< 0.10.0
|
0.10.0
|
References
Frequently Asked Questions
What is CVE-2026-59220?
Which Open WebUI versions are affected?
What version fixes CVE-2026-59220?
Is open-webui affected?
What is the CVSS score of CVE-2026-59220?
What CWE is associated with CVE-2026-59220?
How can I check PyPI dependencies for CVE-2026-59220?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ffpj-xv5c-p3gw",
"modified" : "2026-07-24T16:55:55Z",
"published" : "2026-07-24T16:55:55Z",
"aliases" : [ "CVE-2026-59220" ],
"summary" : "Open WebUI: ReDoS in skill-mention regexes causes whole-instance DoS on default config",
"details" : "## Summary\nTwo regexes in `backend/open_webui/utils/middleware.py` that parse `<$skillId|label>` skill-mention tags backtrack in O(n²) on input that contains `<$` followed by a long run with no closing `>`. Both run synchronously, on the asyncio event loop, on **every** chat completion with no feature gate. Because the default deployment is a single uvicorn worker, one such input pins a CPU core inside `re` and freezes the entire instance for all users until the worker is killed. Any authenticated user can trigger it with one chat message; it also fires accidentally on benign retrieved content (a RAG chunk or tool output) containing the pattern.\n\n## Affected versions\n`>= 0.9.2, < 0.10.0`. Fixed in **v0.10.0** (there is no 0.9.7 release).\n- `SKILL_MENTION_RE` (the extract pattern) has been O(n²) since **v0.9.2**; exploitable on 0.9.2–0.9.5 with a large input (hundreds of KB).\n- **v0.9.6** added a second, far more aggressive O(n²) in the strip pattern (introduced by the \"keep label as readable text\" change), so on 0.9.6 a small input is enough to hang the instance.\n\nBoth are fixed by the same patch.\n\n## Affected component\n`backend/open_webui/utils/middleware.py` (line numbers as of v0.9.6):\n\n```python\n# line 2223 — used by extract_skill_ids_from_messages(), called unconditionally (~line 2625)\nSKILL_MENTION_RE = re.compile(r'<\\$([^|>]+)\\|?[^>]*>')\n\n# line 2247 — used by strip_skill_mentions(), called unconditionally (line 2662)\nstrip_re = re.compile(r'<\\$[^|>]+\\|?([^>]*)>')\n```\n\n`extract_skill_ids_from_messages()` runs before the `if all_skill_ids:` block (that guard gates only skill *injection*, not the regex), and `strip_skill_mentions()` runs with no guard at all. Neither requires a skill to exist or any setting to be enabled. Both functions are plain synchronous calls inside the async `process_chat_payload` coroutine, so they block the event loop; with the default `UVICORN_WORKERS=1` (`backend/start.sh`) the whole instance stalls.\n\n## Root cause\n`[^|>]` is a subset of `[^>]`, so the quantifier pair `[^|>]+ \\|? [^>]*` is ambiguous: on input that never closes with `>`, `[^|>]+` greedily consumes the tail, `>` fails, and the engine backtracks through every split point between `[^|>]+` and `[^>]*` — O(n) positions each doing O(n) work. Polynomial, not exponential, but more than enough to hang a single worker on a ~100 KB input.\n\n## Proof of concept\nStandalone (no Open WebUI required):\n\n```python\nimport re, time\nEXTRACT = re.compile(r'<\\$([^|>]+)\\|?[^>]*>')\nSTRIP = re.compile(r'<\\$[^|>]+\\|?([^>]*)>')\nfor n in (8_000, 16_000, 32_000, 64_000):\n s = '<$' + ('a' * n)\n for name, rx in (('extract', EXTRACT), ('strip', STRIP)):\n t = time.perf_counter(); rx.search(s)\n print(f'n={n:>6} {name:>7} = {(time.perf_counter()-t)*1000:8.1f} ms')\n```\n\nTime quadruples per doubling of `n` (textbook O(n²)); the strip pattern runs for ~6 seconds on a 64k blob and for minutes on a ~96 KB one.\n\nEnd-to-end against a live instance (default config):\n1. `docker run ghcr.io/open-webui/open-webui:v0.9.6` on defaults.\n2. Log in as any user (no admin or skill setup).\n3. Send a chat message containing `<$` followed by 50k+ characters with no `>`.\n4. One CPU core pegs in `re`; UI and API stop responding for every user until the worker is killed.\n\n## Patch\nRewrite the optional `|label` as a non-capturing optional group so the two quantifiers no longer overlap. Both patterns become linear; captures and substituted output are unchanged on well-formed `<$id|label>`, `<$id|>`, and bare `<$id>` mentions.\n\n```python\nSKILL_MENTION_RE = re.compile(r'<\\$([^|>]+)(?:\\|[^>]*)?>')\nstrip_re = re.compile(r'<\\$[^|>]+(?:\\|([^>]*))?>')\n```\n\nAfter the patch the same hostile input returns in under 1 ms. Shipped in v0.10.0.\n\n## Credit\nReported by @Vlad-WKG, including a correct root-cause analysis and patch.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "open-webui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.9.2"
}, {
"fixed" : "0.10.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-ffpj-xv5c-p3gw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59220"
}, {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/commit/61a26722155ec6ee1b629cf8dfcf975098c18331"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/open-webui/open-webui"
}, {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/releases/tag/v0.10.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T16:55:55Z",
"nvd_published_at" : "2026-07-09T17:17:03Z"
}
}