GHSA-rcvp-6fgw-c7fh CVE-2026-44563 PYSEC-2026-2754
Open WebUI's Ollama Model Access Control Bypass via /api/generate, /api/embed, /api/embeddings, and /api/show
- Severity
- 5.4 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.24%
- Chance of exploitation in the next 30 days. Higher than 14.87% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-862 Missing Authorization
- Fix
0.9.0- Upgrade open-webui to this version or later
Description
Ollama Model Access Control Bypass via /api/generate, /api/embed, /api/embeddings, and /api/show
Affected Component
Ollama proxy endpoints missing model access control:
backend/open_webui/routers/ollama.py(lines 955-995,generate_completion)backend/open_webui/routers/ollama.py(lines 835-881,embed)backend/open_webui/routers/ollama.py(lines 891-937,embeddings)backend/open_webui/routers/ollama.py(lines 791-820,show_model_info)
Affected Versions
Current main branch (commit 6fdd19bf1) and likely all versions with Ollama model access control support.
Description
Four Ollama proxy endpoints accept any model name from the user and forward the request to the Ollama backend without checking whether the user is authorized to access that model. These endpoints only require get_verified_user (any authenticated non-pending user) and validate that the model exists in the full unfiltered model list, but never check AccessGrants.has_access().
This is in direct contrast with the /ollama/api/chat endpoint (line 1101-1122) which correctly validates model access grants and returns 403 for unauthorized users:
# /api/chat (line 1101-1122) — CORRECTLY checks access
if not bypass_filter and user.role == 'user':
user_group_ids = {group.id for group in Groups.get_groups_by_member_id(user.id)}
if not (
user.id == model_info.user_id
or AccessGrants.has_access(
user_id=user.id, resource_type='model',
resource_id=model_info.id, permission='read',
user_group_ids=user_group_ids,
)
):
raise HTTPException(status_code=403, detail='Model not found')
# /api/generate (line 955-995) — NO access check at all
# /api/embed (line 835-881) — NO access check at all
# /api/embeddings (line 891-937) — NO access check at all
# /api/show (line 791-820) — NO access check at all
CVSS 3.1 Breakdown
| Metric | Value | Rationale |
|---|---|---|
| Attack Vector | Network (N) | Exploited remotely via API calls |
| Attack Complexity | Low (L) | Single API call with a known model name |
| Privileges Required | Low (L) | Requires any authenticated user account |
| User Interaction | None (N) | No victim interaction required |
| Scope | Unchanged (U) | Impact within the Ollama model access boundary |
| Confidentiality | Low (L) | /api/show exposes restricted model details including system prompts and parameters |
| Integrity | None (N) | No data modification |
| Availability | Low (L) | Unauthorized consumption of GPU/compute resources on restricted models |
Attack Scenario
- Admin configures model access control, restricting
llama3:70bto the "ML Engineers" group. Regular user Alice is only authorized forllama3:8b. - Alice knows the restricted model name (model names are predictable —
llama3:70b,mistral:latest, etc.). - Alice calls the unprotected endpoints directly:
# Run completions on restricted model curl -X POST /ollama/api/generate \ -H "Authorization: Bearer <alice_token>" \ -d '{"model": "llama3:70b", "prompt": "..."}' # View restricted model details and system prompt curl -X POST /ollama/api/show \ -H "Authorization: Bearer <alice_token>" \ -d '{"model": "llama3:70b"}' # Generate embeddings with restricted model curl -X POST /ollama/api/embed \ -H "Authorization: Bearer <alice_token>" \ -d '{"model": "llama3:70b", "input": "..."}' - All requests succeed and are proxied to Ollama without any access control check.
Impact
- Model access control is silently ineffective for four out of five Ollama proxy endpoints
- Unauthorized users can consume GPU/compute resources on restricted models (cost and capacity impact in multi-user deployments)
/api/showexposes restricted model configurations including system prompts, parameters, templates, and license information- Admins have a false sense of security — access restrictions appear to work via the main chat interface but are trivially bypassed via direct API calls
Preconditions
- Ollama must be configured as a backend
- Admin must have configured model access control (not using
BYPASS_MODEL_ACCESS_CONTROL=true) - Attacker must know the restricted model name (model names follow predictable conventions)
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| open-webui | < 0.9.0 |
0.9.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
open-webui PyPI → 0.9.0
- pip
pip install --upgrade "open-webui>=0.9.0"- poetry
poetry add "open-webui>=0.9.0"- uv
uv add "open-webui>=0.9.0"
Severity breakdown
CVSS 3.1 5.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- None
- Availability
- Low
Weakness
CWE-862: Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-wvm9-9g5j-623f Open WebUI: Users denied by the OAuth role policy can still sign in via token exchange | Medium | Also affects open-webui |
| GHSA-4qg5-cxx4-g927 Open WebUI: Users denied by the OAuth domain allowlist or role policy can still sign in via token exchange | Medium | Also affects open-webui |
| GHSA-jqhh-cjmq-vmv6 Open WebUI: Any authenticated user can hang the server via a cyclic chat message history | Medium | Also affects open-webui |
| GHSA-5x7x-4c3c-qf5w Open WebUI: Server-side fetches reach blocked and internal hosts via unvalidated HTTP redirect targets | Medium | Also affects open-webui |
| GHSA-3cgp-3cqx-j8w2 Open WebUI: Any authenticated user can hang the server via message deletion in a cyclic chat tree | Medium | Also affects open-webui |
| GHSA-34r3-9m95-vq73 Open WebUI: Any authenticated user can reach the Azure platform channel via server-side web fetch | High | Also affects open-webui |
| GHSA-2724-6cpj-gf3v Open WebUI: Non-admin users can delete admin-owned external knowledge connections via knowledge base deletion | High | Also affects open-webui |
| GHSA-3pf7-q2g3-wj28 Open WebUI: Any authenticated user can inject chats into another user's folder via chat completions | Medium | Also affects open-webui |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor