CVE-2026-59227: Open WebUI POST /api/v1/images/edit Bypasses The Global Vulnerability

MODERATE
Advisory Identifier: GHSA-rqj7-6wrp-6g2g
CVSS 4.3
CWE-862 CWE-863
Published
Advisory Summary

CVE-2026-59227 is a MODERATE (CVSS 4.3) post /api/v1/images/edit bypasses the global vulnerability (CWE-862: Missing Authorization) affecting Open WebUI libraries in the PyPI ecosystem. The issue involves post /api/v1/images/edit bypasses the global image-edit switch and the per-user image-generation permission. Remediation is available by upgrading affected packages to version 0.10.0.

CVE-2026-59227 at a Glance

CVE Identifier CVE-2026-59227
GHSA Identifier GHSA-rqj7-6wrp-6g2g
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-862: Missing Authorization
Affected Product Open WebUI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-59227

To remediate this vulnerability, upgrade all affected Open WebUI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

open-webui fixed: 0.10.0
pip install open-webui>=0.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show open-webui

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-59227, inspect your installed packages using pip:

pip show open-webui

Analyze the terminal output to locate any version of Open WebUI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.0), your application is affected.

Note: The pip show open-webui command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Open WebUI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `POST /api/v1/images/edit` performed no authorization beyond requiring a verified account. Every other image-editing surface in Open WebUI enforces the global image-edit switch and the per-user image-generation permission — the `/api/v1/images/generations` route, the built-in `edit_image` tool, and the chat image-edit middleware — but the direct edit route enforced neither. A verified non-admin user could therefore invoke server-side image editing, reaching the configured image-edit provider with the administrator's credentials, even when the administrator had globally disabled image editing (`ENABLE_IMAGE_EDIT=False`) or denied that user image-generation permission. The image-editing UI is surfaced only to administrators (Playground), so the route additionally exposed an admin-only capability to any verified user. ## Impact An authenticated, non-admin user can: - bypass the global `ENABLE_IMAGE_EDIT=False` administrator control; - bypass a denied per-user/group `features.image_generation` permission; - cause the server to send billable image-edit requests to the configured provider (OpenAI-compatible, Gemini, or ComfyUI) using administrator-configured credentials (`IMAGES_EDIT_OPENAI_API_KEY` for the OpenAI engine). No cross-user data is exposed and the provider credentials are never returned to the caller; the impact is the control/permission bypass and the associated billable resource consumption. ## Affected Versions `>= 0.8.11, < 0.10.0` (the `/api/v1/images/edit` route was introduced in 0.8.11 and was ungated from the outset). Fixed in **v0.10.0**. ## Details `/api/v1/images/generations` enforces `ENABLE_IMAGE_GENERATION` (403 if globally disabled) and `features.image_generation` (403 for non-admins without the permission). The `edit_image` built-in tool and the chat image-edit middleware likewise gate on `ENABLE_IMAGE_EDIT` and `features.image_generation`. The direct `POST /api/v1/images/edit` route ran on `Depends(get_verified_user)` alone and proceeded straight to provider dispatch, applying none of these controls. ## Proof of Concept As a verified non-admin user, with image editing globally disabled (`ENABLE_IMAGE_EDIT=False`) or `features.image_generation` denied for the user: ```http POST /api/v1/images/edit Authorization: Bearer <non_admin_user_token> Content-Type: application/json {"image":"data:image/png;base64,<png>","prompt":"edit","model":"gpt-image-1"} ``` The request reaches the configured image-edit provider and returns an edited image despite the disabled control/permission. ## Patch The direct route is split from its shared implementation (mirroring `generate_images`/`image_generations`): a thin `/edit` route now enforces `ENABLE_IMAGE_EDIT` and the per-user `features.image_generation` permission before delegating to the shared `image_edits()` implementation. The internal callers (the `edit_image` tool and the chat middleware) call the implementation directly and already gate themselves, so they are unaffected.

CVE-2026-59227 Affected Open WebUI Versions

1 component(s)
Fixed Versions:
0.10.0
Product / Package Ecosystem Affected Versions Fixed Version
open-webui
PyPI
≥ 0.8.11
< 0.10.0
0.10.0

References

Frequently Asked Questions

What is CVE-2026-59227?
CVE-2026-59227 is a security vulnerability in Open WebUI involving POST /api/v1/images/edit bypasses the global image-edit switch and the per-user image-generation permission under CWE-862: Missing Authorization.
Which Open WebUI versions are affected?
Affected versions include releases prior to 0.10.0 across affected packages: open-webui.
What version fixes CVE-2026-59227?
Upgrading to 0.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is open-webui affected?
Yes, open-webui is affected in releases prior to 0.10.0. Upgrade your dependency to 0.10.0 or later.
What is the CVSS score of CVE-2026-59227?
CVE-2026-59227 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-59227?
CVE-2026-59227 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check PyPI dependencies for CVE-2026-59227?
Run the dependency tree command: 'pip show open-webui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rqj7-6wrp-6g2g",
  "modified" : "2026-07-24T16:58:48Z",
  "published" : "2026-07-24T16:58:48Z",
  "aliases" : [ "CVE-2026-59227" ],
  "summary" : "Open WebUI: POST /api/v1/images/edit bypasses the global image-edit switch and the per-user image-generation permission",
  "details" : "## Summary\n\n`POST /api/v1/images/edit` performed no authorization beyond requiring a verified account. Every other image-editing surface in Open WebUI enforces the global image-edit switch and the per-user image-generation permission — the `/api/v1/images/generations` route, the built-in `edit_image` tool, and the chat image-edit middleware — but the direct edit route enforced neither. A verified non-admin user could therefore invoke server-side image editing, reaching the configured image-edit provider with the administrator's credentials, even when the administrator had globally disabled image editing (`ENABLE_IMAGE_EDIT=False`) or denied that user image-generation permission. The image-editing UI is surfaced only to administrators (Playground), so the route additionally exposed an admin-only capability to any verified user.\n\n## Impact\n\nAn authenticated, non-admin user can:\n\n- bypass the global `ENABLE_IMAGE_EDIT=False` administrator control;\n- bypass a denied per-user/group `features.image_generation` permission;\n- cause the server to send billable image-edit requests to the configured provider (OpenAI-compatible, Gemini, or ComfyUI) using administrator-configured credentials (`IMAGES_EDIT_OPENAI_API_KEY` for the OpenAI engine).\n\nNo cross-user data is exposed and the provider credentials are never returned to the caller; the impact is the control/permission bypass and the associated billable resource consumption.\n\n## Affected Versions\n\n`>= 0.8.11, < 0.10.0` (the `/api/v1/images/edit` route was introduced in 0.8.11 and was ungated from the outset). Fixed in **v0.10.0**.\n\n## Details\n\n`/api/v1/images/generations` enforces `ENABLE_IMAGE_GENERATION` (403 if globally disabled) and `features.image_generation` (403 for non-admins without the permission). The `edit_image` built-in tool and the chat image-edit middleware likewise gate on `ENABLE_IMAGE_EDIT` and `features.image_generation`. The direct `POST /api/v1/images/edit` route ran on `Depends(get_verified_user)` alone and proceeded straight to provider dispatch, applying none of these controls.\n\n## Proof of Concept\n\nAs a verified non-admin user, with image editing globally disabled (`ENABLE_IMAGE_EDIT=False`) or `features.image_generation` denied for the user:\n\n```http\nPOST /api/v1/images/edit\nAuthorization: Bearer <non_admin_user_token>\nContent-Type: application/json\n\n{\"image\":\"data:image/png;base64,<png>\",\"prompt\":\"edit\",\"model\":\"gpt-image-1\"}\n```\n\nThe request reaches the configured image-edit provider and returns an edited image despite the disabled control/permission.\n\n## Patch\n\nThe direct route is split from its shared implementation (mirroring `generate_images`/`image_generations`): a thin `/edit` route now enforces `ENABLE_IMAGE_EDIT` and the per-user `features.image_generation` permission before delegating to the shared `image_edits()` implementation. The internal callers (the `edit_image` tool and the chat middleware) call the implementation directly and already gate themselves, so they are unaffected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.8.11"
      }, {
        "fixed" : "0.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-rqj7-6wrp-6g2g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59227"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/pull/26009"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/commit/e038bab66dec8d17212eec35b5cb6d6b785a4200"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-webui/open-webui"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/releases/tag/v0.10.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862", "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-24T16:58:48Z",
    "nvd_published_at" : "2026-07-09T17:17:04Z"
  }
}