CVE-2026-54021: Open WebUI: Authenticated users can target arbitrary configured Ollama backends via unguarded url_idx path parameter

Published Jun 17, 2026
·
Updated

Summary

Several direct, index-addressed Ollama proxy routes accept a caller-supplied urlidx path parameter and use it as a raw index into the admin-configured OLLAMABASEURLS list. Access control on these routes validates only whether the user may use the requested model, never which backend the request is routed to. Any authenticated user can append an arbitrary urlidx to force their request onto an Ollama backend they were never authorized to reach, including internal, higher-privilege, or explicitly admin-disabled backends.

Affected endpoints

All indexed Ollama routes that resolve the backend through getollamaurl():

POST /ollama/api/chat/{urlidx} POST /ollama/api/generate/{urlidx} POST /ollama/api/embed/{urlidx} POST /ollama/api/embeddings/{urlidx} POST /ollama/v1/chat/completions/{urlidx} POST /ollama/v1/completions/{urlidx} POST /ollama/v1/messages/{urlidx} POST /ollama/v1/responses/{urlidx}

Root cause

backend/openwebui/routers/ollama.py — getollamaurl() consults the model-to-backend allow-list (OLLAMAMODELS[model]["urls"]) only when urlidx is omitted. When the caller supplies urlidx, that mapping is skipped and the value is used directly as an index:

python async def getollamaurl(request: Request, model: str, urlidx: Optional[int] = None): if urlidx is None: models = request.app.state.OLLAMAMODELS if model not in models: raise HTTPException(...) urlidx = random.choice(models[model].get("urls", [])) url = request.app.state.config.OLLAMABASEURLS[urlidx] # caller-controlled, no authz return url, urlidx

The outbound request is then sent to that backend using the backend's own configured API key. Backends an admin has disabled (OLLAMAAPICONFIGS["<idx>"].enable = false) are hidden from model discovery but remain reachable through the indexed route, because the disabled state is never re-checked at request time.

Impact

A verified, non-admin user with read access to any single model can: - route requests to internal / higher-capability / restricted Ollama backends in multi-backend deployments, bypassing backend-level isolation; - reach backends the admin has explicitly disabled; - have those requests authenticated with the target backend's configured API key (the key is used server-side; it is not returned to the attacker); - consume the restricted backend's compute.

There is no cross-user data disclosure and no exfiltration of the backend credential itself; the impact is unauthorized access to, and use of, restricted backend resources.

Affected / Patched

- Affected: <= 0.9.5 - Patched: >= 0.9.6

Fix

0.9.6 adds validateollamabackendidx(), invoked on every indexed route (directly and via getollamaurl()), which returns 403 for any non-admin caller-supplied urlidx that is not in the requested model's allowed urls. Because disabled backends are absent from every model's urls, the same check also blocks routing to disabled backends.

Other sources

Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.6, several direct, index-addressed Ollama proxy routes accept a caller-supplied urlidx path parameter and use it as a raw index into the admin-configured OLLAMABASEURLS list. Access control on these routes validates only whether the user may use the requested model, never which backend the request is routed to. Any authenticated user can append an arbitrary urlidx to force their request onto an Ollama backend they were never authorized to reach, including internal, higher-privilege, or explicitly admin-disabled backends. This vulnerability is fixed in 0.9.6.

MITRE

Affected Software

2 affected componentsFixes available
pip/open-webui<=0.9.5
0.9.6
openwebui Open WebUI<0.9.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/open-webui to a version that resolves this vulnerability.

    Fixed in 0.9.6
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in >= 0.9.6
  3. Configuration

    Upgrade to Open WebUI >= 0.9.6 and ensure the new validate_ollama_backend_idx() check is applied to every indexed Ollama route so caller-supplied url_idx cannot bypass backend enable/authorization controls.

    Open WebUI (Ollama routing) validate_ollama_backend_idx() = invoked on every indexed route (directly and via get_ollama_url())

Event History

Jun 17, 2026
Advisory Published
via GitHub·06:01 PM
Data Sourced
via GitHub·06:01 PM
DescriptionSeverityWeaknessAffected Software
Jun 23, 2026
CVE Published
via MITRE·04:39 PM
Data Sourced
via MITRE·04:39 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:18 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-54021?

The severity of CVE-2026-54021 is rated as medium with a score of 6.3.

2

How do I fix CVE-2026-54021?

To fix CVE-2026-54021, ensure proper access controls are implemented on the proxy routes that utilize the 'url_idx' parameter.

3

What impact does CVE-2026-54021 have?

CVE-2026-54021 may allow unauthorized access to potentially sensitive information through the exploitation of poorly secured proxy routes.

4

Which software is affected by CVE-2026-54021?

CVE-2026-54021 affects the pip/open-webui software package.

5

When was CVE-2026-54021 published?

CVE-2026-54021 was published on June 17, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203