CVE-2026-45339: Open WebUI's API key endpoint restrictions bypassed via `x-api-key` header — full message processing on restricted endpoints
In Open WebUI before 0.9.0, an API key with endpoint restrictions can ignore them by sending the key in the x-api-key header instead of Authorization: Bearer. The restricted endpoint then authenticates the request and runs it. Upgrade the open-webui pip package to 0.9.0.
Published May 14, 2026 · Updated Nov 3, 2026 · Analysis Nov 3, 2026
What an attacker can do
Open WebUI lets admins limit which API endpoints a key may call. The check ran only when the key arrived in the Authorization header. Open WebUI's Anthropic-compatible path also accepts the key in x-api-key, and for that header the restriction check was skipped while authentication still succeeded.
The advisory's proof of concept on v0.8.11 shows a key blocked from /api/v1/messages getting API key not allowed to access this endpoint. over Authorization, and a full model response (HTTP 200) over x-api-key with the same key.
The attacker already needs a valid API key, and the vector shows high privileges (PR:H), so this is not an outside attack. It matters where keys are handed to users, apps or agents with the intent of narrowing them. A key restricted away from chat endpoints can still send messages and spend model credits. A key restricted from admin endpoints may reach admin functions, as the advisory states. The restriction model gives a false sense of control.
Who is affected
Affected: the open-webui pip package before 0.9.0. The proof of concept was verified on v0.8.11. Only deployments that use per-key endpoint restrictions are exposed in a meaningful way. Check your version:
pip show open-webuiFor Docker, check the image tag.
open-webui
- Ecosystem
- PyPI
- Affected
- < 0.9.0
- Fixed in
- 0.9.0
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.9.0:
pip install --upgrade open-webui==0.9.0The 0.9.0 release notes say API key endpoint restrictions are now enforced however the key is sent, closing the bypass through alternate key transport paths. They also note that Anthropic-compatible clients can authenticate with x-api-key across the relevant routes. The advisory lists no workaround. Until you upgrade, treat endpoint restrictions as ineffective and issue keys only to parties you trust with full access.
How to tell if you were hit
Look in reverse proxy or access logs for requests carrying an x-api-key header to endpoints that the key's owner is restricted from, such as /api/v1/messages, returning 200. Compare with the same keys' Authorization-header requests that return 403. Review model usage and credit spend per key for activity on endpoints you had blocked. The advisory gives no Open WebUI log line for this.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Open WebUI allows admins to restrict which API endpoints an API key can access. When an API key is restricted from /api/v1/messages, requests using the Authorization: Bearer sk-... header are correctly blocked with 403. However, the same key sent via the x-api-key header bypasses the restriction entirely — the request is authenticated, the model is invoked, and a full response is returned.
Details
Open WebUI's Anthropic-compatible API path accepts authentication via x-api-key header (standard for the Anthropic API). The endpoint restriction check only applies to keys presented via the Authorization header. When the same sk-... key is supplied in x-api-key, the restriction check is skipped but the key is still valid for authentication.
This means any API key, regardless of its configured endpoint restrictions, can access any API endpoint by simply using x-api-key instead of Authorization.
PoC
Verified against Open WebUI v0.8.11.
Setup: Admin creates a user with an API key that has endpoint restrictions (not allowed on /api/v1/messages). A mock OpenAI-compatible model (mock-model) is configured.
API_KEY="sk-dc56016d720e49ba9e95584d602b79bb"
# Test 1: Authorization header — BLOCKED (endpoint restriction enforced)
curl -s -X POST http://target:8080/api/v1/messages \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"mock-model","messages":[{"role":"user","content":"via Authorization header"}]}'
# Test 2: x-api-key header — BYPASS (same key, restriction skipped)
curl -s -X POST http://target:8080/api/v1/messages \
-H "x-api-key: $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"mock-model","messages":[{"role":"user","content":"via x-api-key header"}]}'Verified output:
# Authorization header:
{"detail":"API key not allowed to access this endpoint."}
# x-api-key header (SAME key):
{"id":"chatcmpl-mock","type":"message","role":"assistant","content":[{"type":"text","text":"MOCK-CHAT-RESPONSE"}],"model":"mock-model","usage":{"input_tokens":1,"output_tokens":1}}The same API key is rejected via Authorization (403) but fully processed via x-api-key (200 with model response).
Impact
Any API key with endpoint restrictions can bypass those restrictions by using the x-api-key header instead of Authorization. This undermines the entire API key permission model:
- Keys restricted from chat/completion endpoints can still send messages and receive LLM responses
- Keys restricted from admin endpoints may access admin functionality
- The operator's intended access control is silently ineffective
- API credit spend cannot be controlled through endpoint restrictions
Credited to aliceQWAS, Classic298, westonsteimel.
Questions
- Does CVE-2026-45339 give access to people without an API key?
No. The attacker needs a valid API key. The flaw only removes the endpoint restrictions placed on that key.
- How do I test whether my instance is vulnerable?
Send a request to an endpoint the key is blocked from, once with Authorization: Bearer and once with x-api-key. A 403 on the first and a 200 on the second confirms the bug.
- Which version fixes it?
open-webui 0.9.0. Everything before it is listed as vulnerable.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
