Open-webui allows attackers to run code via misconfigured CORS and weak session checks

HighSE Fix-First Score 43/100CVE-2026-56400SE-AIV-00847Remote code executionModel serving and inferencePublished 11 May 2026

Download as PDF

What this means

An attacker who tricks an admin into visiting a malicious website can run any code on the open-webui server. Since open-webui often runs as root in Docker, the attacker gains complete control of the container and everything in it. This includes all stored chat history, API keys, and connections to other services.

SecurityElites Manager Brief: the decision in one minute

Open-webui has a security flaw that lets attackers run code on your server if an admin visits a malicious site. The fix is a version upgrade. You should deploy it as soon as possible.

SecurityElites Fix-First Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform or DevOps team managing open-webui deployments.
Likely effortAbout 15 minutes per deployment: download version 0.3.33, run the upgrade, and verify the service starts. Longer if you have many instances or need to test in staging first.

Questions to ask your team or supplier

  • Do we know which open-webui instances are running versions older than 0.3.33, and what their business impact is if they are compromised?
  • Have admins visited untrusted websites while logged into open-webui since it was deployed, and do we have logs to check for exploitation?
  • What API keys and external credentials are stored in open-webui, and are they also used in other critical systems that need to be rotated?

Message you can forward to the owning team

Security notice: Open-webui allows attackers to run code via misconfigured CORS and weak session checks (CVE-2026-56400)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to open-webui 0.3.33 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-56400-open-webui-allows-attackers-to-run-code-via-misconfigured-cors/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-00847

What is at stake in your AI setup

  • API keys for external LLM providers: an attacker could read, modify, or use them to call expensive models at your cost
  • Chat history and prompts: sensitive conversations or instructions stored in open-webui could be read or deleted
  • Custom functions and tools: an attacker could modify or add malicious functions that the AI agent runs in future sessions
  • Connections to external systems: if open-webui has API credentials to other services (databases, APIs), an attacker gains access to those

Map where your company uses AI

Who is exposed

  • Teams running open-webui with admin access from web browsers
  • Docker deployments running open-webui as root (the default setup)
  • Instances exposed to any network where admins might visit untrusted sites
  • Teams with API keys or credentials stored in open-webui for LLM providers or external tools
  • Not affected: air-gapped instances where admins do not access external websites

Upgrades you need

SoftwareAffected versionsMove to
open-webui
PyPI
Every version before 0.3.330.3.33 or later

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedWorking attack code is public, so expect attacks to follow
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededNone. No login is needed
Does a person have to do somethingYes. Someone has to click, open or approve something
How hard it is to doHard. It depends on conditions the attacker does not control
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

Kind of coding mistake

  • CWE-613

Signs it may already have been used against you

  • API access logs: look for POST requests to `/api/v1/functions` from browsers or referers that are not your own domain
  • Application logs: search for unexpected function execution or code being loaded from external sources
  • Chat history or model interactions: look for entries that do not match user activity or contain tool calls the user did not make
  • System logs: check for processes spawned by the open-webui container that were not started by admins

Log searches to start from

API requests to functions endpoint from external referers (adapt field names to your logs)Splunk

sourcetype=http_access path=/api/v1/functions method=POST referer!="" | where referer NOT LIKE "%yourdomain.com%"

Unexpected function calls in application logs (adapt field names to your logs)Elastic

source:open-webui AND ("function execute" OR "code run") AND NOT user:admin_account

Written with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.

SecurityElites Fix Guide: step by step

  1. Find all open-webui installationsList all servers, containers, and machines running open-webui. Check your deployment records, container registries, and infrastructure tools. Include dev, test, and staging instances.
  2. Check the current version on each instanceLog into each open-webui instance and check the version number. Look in the web UI settings or run a version query on the API. Document which instances are older than 0.3.33.
  3. Back up data before upgradingExport or snapshot the open-webui database, chat history, function definitions, and any stored API keys. If possible, back up the entire container or VM so you can roll back if needed.
  4. Upgrade to open-webui version 0.3.33 or laterPull the latest image or install version 0.3.33 from PyPI. Stop the old version, deploy the new version, and start the service. Follow your normal change and deployment process.
  5. Verify the service started and is workingCheck that the web interface loads, you can log in, and core features work (chat, model selection, function calls). Check the application logs for errors. If anything fails, roll back to the backup and get help.
  6. Check for signs of past exploitationReview logs and audit trails for the period before the upgrade. Look for unexpected function calls, code execution, or access from unfamiliar IP addresses or browsers. If you find signs of an attack, isolate the instance and investigate further.
  7. Advise users about the risk periodIf the instance was exposed before upgrade, tell admins they may have been targeted. Rotate any API keys or credentials that were stored in open-webui. Check external systems that open-webui connects to for unauthorized changes.
  8. Track the upgrade across all instancesKeep a log showing which instances have been upgraded and when. Set a deadline to upgrade all remaining instances. Treat any that cannot be upgraded soon as high-risk and restrict who can access them.

How to confirm it is fixed: After upgrade, confirm that the version shows 0.3.33 or later in the API or web UI, and test that normal admin functions like creating and running functions still work correctly.

SecurityElites Quick Fixes: copy and paste

Upgrade open-webui with pipupgrade

pip install --upgrade "open-webui>=0.3.33"
pip show open-webui | grep Version

Pin it in requirements.txtupgrade

open-webui>=0.3.33

Check open-webui version via APIfor this issue

curl -s http://localhost:8080/api/version | head -20

Run the service in a locked-down containergeneral hardening

docker run --read-only --cap-drop ALL \
  --security-opt no-new-privileges --user 1000:1000 \
  -p 127.0.0.1:8080:8080 YOUR_IMAGE

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (CVE-2026-56400) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - open-webui (PyPI): must be 0.3.33 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

An admin visits a malicious website and comes back to open-webui. What attack can happen and why?A good answer: The website can make authenticated requests to open-webui's API (via CORS misconfiguration) and trigger code execution through the functions endpoint because session cookies are sent automatically.
Why is this a critical risk in Docker deployments?A good answer: Open-webui runs as root in Docker by default, so any code an attacker executes has full control of the container, all data inside it, and potentially the host system.
What should we check in logs if we suspect this was used against us?A good answer: Look for POST requests to `/api/v1/functions` from unexpected sources or browsers, function executions that do not match user activity, and system processes spawned by the container that were not authorized.
What is the minimum action to reduce this risk today?A good answer: Restrict network access to open-webui to your internal network only, tell admins not to visit untrusted sites in the same browser session, and rotate all stored API keys.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## Open-webui allows attackers to run code via misconfigured CORS and weak session checks (CVE-2026-56400)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-00847 https://securityelites.com/ai-vulnerabilities/cve-2026-56400-open-webui-allows-attackers-to-run-code-via-misconfigured-cors/

### Why this matters
An attacker who tricks an admin into visiting a malicious website can run any code on the open-webui server. Since open-webui often runs as root in Docker, the attacker gains complete control of the container and everything in it. This includes all stored chat history, API keys, and connections to other services.

### What to do
1. Find all open-webui installations: List all servers, containers, and machines running open-webui. Check your deployment records, container registries, and infrastructure tools. Include dev, test, and staging instances.
2. Check the current version on each instance: Log into each open-webui instance and check the version number. Look in the web UI settings or run a version query on the API. Document which instances are older than 0.3.33.
3. Back up data before upgrading: Export or snapshot the open-webui database, chat history, function definitions, and any stored API keys. If possible, back up the entire container or VM so you can roll back if needed.
4. Upgrade to open-webui version 0.3.33 or later: Pull the latest image or install version 0.3.33 from PyPI. Stop the old version, deploy the new version, and start the service. Follow your normal change and deployment process.
5. Verify the service started and is working: Check that the web interface loads, you can log in, and core features work (chat, model selection, function calls). Check the application logs for errors. If anything fails, roll back to the backup and get help.
6. Check for signs of past exploitation: Review logs and audit trails for the period before the upgrade. Look for unexpected function calls, code execution, or access from unfamiliar IP addresses or browsers. If you find signs of an attack, isolate the instance and investigate further.
7. Advise users about the risk period: If the instance was exposed before upgrade, tell admins they may have been targeted. Rotate any API keys or credentials that were stored in open-webui. Check external systems that open-webui connects to for unauthorized changes.
8. Track the upgrade across all instances: Keep a log showing which instances have been upgraded and when. Set a deadline to upgrade all remaining instances. Treat any that cannot be upgraded soon as high-risk and restrict who can access them.

### Done when
- [ ] open-webui is at 0.3.33 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] After upgrade, confirm that the version shows 0.3.33 or later in the API or web UI, and test that normal admin functions like creating and running functions still work correctly.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Related vulnerabilities

In the same software

The same kind of mistake in other AI tools

Change history

  • 11 May 2026: Made public
  • 1 Dec 2026: Published

Official record

# GitHub Security Lab (GHSL) Vulnerability Report, open-webui: `GHSL-2024-174`, `GHSL-2024-175`The [GitHub Security Lab](https://securitylab.github.com) team has identified potential security vulnerabilities in [open-webui](https://github.com/open-webui/open-webui).We are committed to working with you to help resolve these issues. In this report you will find everything you need to effectively coordinate a resolution of these issues with the GHSL team.If at any point you have concerns or questions about this process, please do not hesitate to reach out to us at `securitylab@github.com` (please include `GHSL-2024-174` or `GHSL-2024-175` as a reference). See also [this blog post](https://github.blog/2022-04-22-removing-the-stigma-of-a-cve/) written by GitHub's Advisory Curation team which explains what CVEs and advisories are, why they are important to track vulnerabilities and keep downstream users informed, the CVE assigning process, and how they are used to keep open source software secure.If you are _NOT_ the correct point of contact for this report, please let us know!## SummaryDue to a CORS misconfiguration and session validation issue, an attacker may be able to perform a 1 click attack against browsers with admin access to openwebui, resulting in remote code execution in the openwebui instance. The openwebui application runs as root in Docker container's default setup, which allows for complete compromise of the container.## Projectopen-webui## Tested Version[v0.3.10](https://github.com/open-webui/open-webui/releases/tag/v0.3.10)## Details### Issue 1: CORS misconfiguration on multiple routers (`GHSL-2024-174`)CORS misconfigurations exist on multiple routers of open-webui which results in allowing arbitrary websites to make authenticated cross site requests to openwebui. Accounts with access to the `/api/v1/functions` endpoint (admins) can execute arbitrary code on the openwebui instance.The following pattern occurs at the following routers: 1. [backend/apps/webui/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/webui/main.py#L92) 2. [backend/apps/audio/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/audio/main.py#L58) 3. [backend/apps/images/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/images/main.py#L60) 4. [backend/apps/rag/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/rag/main.py#L246) 5. [backend/apps/openai/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/openai/main.py#L47) 6. [backend/apps/ollama/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/ollama/main.py#L62) 7. [backend/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/main.py#L881) ```python app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) ```#### ImpactThis issue may lead to `Remote Code Execution`.#### RemediationThe FastAPI CORS middleware is not safe by default, meaning it reflects the origin when specifying `allow_origins=["*"]`. Remove the vulnerable, broad origin and allow users to dynamically setup the exact allowed origins via the administration panel or config file, do not allow for broad origins such as `"*"` or `"*.com"`#### Proof of ConceptHost the following code on your website, `attacker.com`. Open the webpage using Firefox, and click on the webpage as instructed. Check your openwebui host to see the result of the command `whoami` placed into a newly created file `/tmp/whoami.txt`. Ensure you have logged into an admin open-webui account ```javascript <body> <p>Click here to login.</p> <div id="response"></div> <script> //Firefox cross site cookie request bypass const url = 'http://localhost:3000/static/favicon.png'; document.addEventListener("DOMContentLoaded", () => { document.o

Weakness type: CWE-613

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-56400

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 16 Jul 2026. Read the vendor advisory before changing a production system.