CVE-2026-59213: Open WebUI: Cross-user model-list exposure via static cache key in get_all_models (aiocache key= vs key_builder= misuse)

Published Jul 9, 2026
·
Updated

Summary

The getallmodels handlers in routers/openai.py and routers/ollama.py intended to cache their permission-filtered model lists per user, but the @cached decorator was misconfigured: it passed a key= lambda instead of keybuilder=. In aiocache 0.12.3 (the pinned version), key= is a static cache key — a callable passed there is used as a constant object, not invoked per call. As a result the per-user key was never computed, and all callers collided onto a single shared cache entry within the TTL window. During that window, one user's permission-filtered model list could be served to a different authenticated user, crossing the per-user authorization boundary.

Impact

- Boundary crossed: Confidentiality (cross-user). A caller can receive the model list scoped to a different security principal than themselves. - A user (or admin, or — depending on endpoint reachability — anonymous caller) who populates the cache causes the next caller within the TTL to receive that list rather than their own permission-filtered one. - What's disclosed is the set of models another principal can access, including potentially the existence and naming of models restricted from the receiving user. - Exposure is incidental and timing-dependent, not attacker-controlled: the leaked entry is whatever the most recent caller populated within MODELSCACHETTL (default 1 second), and the attacker cannot select the victim or force a target's list into the cache.

Affected component

- backend/openwebui/routers/openai.py — getallmodels (~line 488) - backend/openwebui/routers/ollama.py — getallmodels (~line 302)

Both decorated with @cached(ttl=MODELSCACHETTL, key=lambda ...). No other @cached(... key=lambda ...) misuse was found elsewhere in the backend.

Root cause

aiocache 0.12's @cached treats key= as a static key; the per-call hook is keybuilder= with signature keybuilder(func, args, kwargs). Passing a callable to key= uses the callable object itself as a constant key, so every invocation resolved to the same entry and the intended per-user.id namespacing never occurred.

Reproduction (default config)

1. On a default deployment, configure at least two users with different model-access permissions (e.g. one model restricted to user A). 2. As user A, request the model list (populates the shared cache entry). 3. Within MODELSCACHETTL (default 1s), as user B, request the model list. 4. User B receives user A's permission-filtered list, including models B is not permitted to see.

Remediation

Replace key= with keybuilder= at both call sites and adjust the lambda to take the function as its first argument:

python @cached( ttl=MODELSCACHETTL, keybuilder=lambda func, request, user=None: ( f'openaiallmodels{user.id}' if user else 'openaiallmodels' ), )

Other sources

Open WebUI is an extensible, feature-rich, and user-friendly self-hosted AI platform. From 0.6.27 before 0.10.0, getallmodels handlers in routers/openai.py and routers/ollama.py passed a lambda to aiocache key instead of keybuilder, causing permission-filtered per-user model lists to share a static cache entry and exposing one user’s model list to another caller during the TTL window. This issue is fixed in version 0.10.0.

MITRE

Affected Software

3 affected componentsFixes available
Open WebUI>0.6.27<=0.10.0
openwebui Open WebUI>=0.6.27<0.10.0
pip/open-webui>=0.6.27<0.10.0
0.10.0

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.10.0
  2. Upgrade

    Upgrade Open WebUI to a version that resolves this vulnerability.

    Fixed in 0.10.0
  3. Configuration

    In get_all_models in routers/openai.py, replace the aiocache @cached decorator usage from `key=lambda ...` to `key_builder=lambda _func, request, user=None: ...` so the cache key is built per-call/per-user (including `user.id`) instead of using a static cache key object.

    backend/open_webui/routers/openai.py — get_all_models @cached(key=...) -> @cached(key_builder=...) = Replace key= with key_builder= (use lambda with first arg _func per aiocache 0.12: key_builder=lambda _func, request, user=None: ... )
  4. Configuration

    In get_all_models in routers/ollama.py, replace the aiocache @cached decorator usage from `key=lambda ...` to `key_builder=lambda _func, request, user=None: ...` so the cache key is built per-call/per-user (including `user.id`) instead of using a static cache key object.

    backend/open_webui/routers/ollama.py — get_all_models @cached(key=...) -> @cached(key_builder=...) = Replace key= with key_builder= (use lambda with first arg _func per aiocache 0.12: key_builder=lambda _func, request, user=None: ... )
  5. Compensating control

    Reduce exposure by shortening MODELS_CACHE_TTL (default 1 second) if you cannot immediately deploy 0.10.0, since the cross-user model-list can only be served during the TTL window.

Event History

Jul 9, 2026
CVE Published
via MITRE·04:55 PM
Data Sourced
via MITRE·04:55 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 24, 2026
Advisory Published
via GitHub·05:03 PM
Data Sourced
via GitHub·05:03 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59213?

The severity of CVE-2026-59213 is low with a score of 3.5.

2

How do I fix CVE-2026-59213?

To fix CVE-2026-59213, update Open WebUI to a version equal to or greater than 0.10.0.

3

What is the main issue described in CVE-2026-59213?

CVE-2026-59213 involves cross-user model-list exposure due to misuse of static cache keys in the get_all_models handlers.

4

Which software is affected by CVE-2026-59213?

CVE-2026-59213 affects Open WebUI versions from 0.6.27 to before 0.10.0.

5

What components are involved in CVE-2026-59213?

The components involved in CVE-2026-59213 are the get_all_models handlers located in routers/openai.py and routers/ollama.py.

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