🛡️ CVE-2026-54015 — open-webui
Description
Open WebUI Prompt history IDOR: unbound history_id allows cross-prompt read and deletion
Summary
Open WebUI's prompt version-history endpoints authorize the prompt_id in the URL but then act on caller-supplied history IDs without verifying that the history row belongs to that prompt (history_entry.prompt_id == prompt.id). Three operations are affected:
GET /api/v1/prompts/id/{prompt_id}/history/diff— returns another prompt's history snapshots (read).POST /api/v1/prompts/id/{prompt_id}/update/version— restores another prompt's snapshot into the caller's prompt, exposing its content (read).DELETE /api/v1/prompts/id/{prompt_id}/history/{history_id}— deletes another prompt's history entry (delete).
An authenticated user with access to any prompt they control, plus a victim prompt_history.id, can read or delete another user's private prompt history. The single-entry read endpoint (GET .../history/{history_id}) already enforces the binding; these three did not.
Impact
Security boundary crossed: prompt confidentiality and integrity.
Prompt history snapshots can contain private prompt text, internal instructions, and sensitive variables. With a known victim prompt_history.id, an attacker can read another user's snapshot (via the diff endpoint or by restoring it into their own prompt) and delete another user's history entry. The active prompt row is not destroyed; the delete impact is against version history. Exploitation requires knowing or obtaining victim history UUIDs, so severity depends on adjacent ID exposure.
Root Cause
The route checks read access only for prompt_id:
```python
# backend/open_webui/routers/prompts.py
prompt = await Prompts.get_prompt_by_id(prompt_id, db=db)
...
if not (
user.role == 'admin'
or prompt.user_id == user.id
or await AccessGrants.has_access(
user_id=user.id,
resource_type='prompt',
resource_id=prompt.id,
permission='read',
db=db,
)
):
raise HTTPException(...)
```
But the authorized prompt ID is not passed into the diff sink:
```python
# backend/open_webui/routers/prompts.py
diff = await PromptHistories.compute_diff(from_id, to_id, db=db)
```
compute_diff() fetches both history entries globally by ID and returns their full snapshots:
```python
# backend/open_webui/models/prompt_history.py
result_from = await db.execute(select(PromptHistory).filter(PromptHistory.id == from_id))
from_entry = result_from.scalars().first()
result_to = await db.execute(select(PromptHistory).filter(PromptHistory.id == to_id))
to_entry = result_to.scalars().first()
...
return {
'from_snapshot': from_snapshot,
'to_snapshot': to_snapshot,
...
}
```
There is no check that from_entry.prompt_id == prompt_id or to_entry.prompt_id == prompt_id.
The same missing binding affects two further endpoints. POST .../update/version restores a snapshot fetched globally by version_id:
```python
# backend/open_webui/models/prompts.py — update_prompt_version
history_entry = await PromptHistories.get_history_entry_by_id(version_id, db=session)
...
prompt.content = snapshot.get('content', prompt.content) # foreign snapshot copied into caller's prompt
prompt.version_id = version_id
```
DELETE .../history/{history_id} deletes an entry fetched globally by history_id:
```python
# backend/open_webui/models/prompt_history.py — delete_history_entry
result = await db.execute(select(PromptHistory).filter_by(id=history_id))
entry = result.scalars().first()
...
await db.delete(entry)
```
Neither checks entry.prompt_id == prompt.id. The single-entry read endpoint (GET .../history/{history_id}) does (history_entry.prompt_id != prompt.id → 404); these three endpoints were missing it.
PoC
```python
#!/usr/bin/env python3
"""
PoC for prompt history diff IDOR.
The PoC executes:
- the real routers.prompts.get_prompt_diff() route function
- the real PromptHistories.compute_diff() implementation
Fake model/DB adapters are used only to avoid requiring a running server. The
security-sensitive behavior under test is that the route authorizes the prompt
ID in the URL, then computes a diff for arbitrary history IDs without checking
that those history rows belong to the authorized prompt.
"""
from __future__ import annotations
import asyncio
import json
import os
import sys
import types
from pathlib import Path
from types import SimpleNamespace
def prepare_imports() -> None:
repo_root = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(repo_root / "backend"))
os.environ["VECTOR_DB"] = "none"
class DummyTyper:
def command(self, *args, **kwargs):
return lambda fn: fn
sys.modules.setdefault(
"typer",
types.SimpleNamespace(
Typer=lambda *args, **kwargs: DummyTyper(),
Option=lambda *args, **kwargs: None,
echo=lambda *args, **kwargs: None,
Exit=Exception,
),
)
sys.mo
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is high, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity low, availability low.
Weakness class
CVE-2026-54015 is classified as CWE-284: Improper Access Control. The software does not restrict an action to the actors that should be allowed to perform it.
Affected software
CVE-2026-54015 is recorded against 1 package.
- open-webui (fixed in 0.9.6)
Timeline and source
Published on 17 June 2026 and last revised on 20 July 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Advisory)
github.com (Package)
github.com (Web)
pypi.org (Web)
Details
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| open-webui | — | 0.9.6 |
References
Similar Threats
- Unknown CGA-48gw-49h8-c5px
- Unknown CGA-3j3w-43wh-4c9q
- Unknown CGA-2r69-w36g-jxvr
- Unknown CGA-27r7-6wp2-vv7p
- Unknown CGA-48q6-wgrm-m89m
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Exploit Protection
Are you running open-webui?
CVE-2026-54015 carries CVSS 6.4 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-54015 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.