CVE-2026-59227: Open WebUI: POST /api/v1/images/edit bypasses the global image-edit switch and the per-user image-generation permission
Open WebUI 0.8.11 up to 0.9.x leaves `POST /api/v1/images/edit` without the global image-edit switch or the per-user image-generation permission. Any verified user can make the server send billable edit requests to the configured image provider with the admin's credentials. Upgrade open-webui to 0.10.0.
Published Jul 24, 2026 · Analysis Oct 25, 2026
What an attacker can do
The route was added in 0.8.11 and was never gated. It runs on Depends(get_verified_user) alone and goes straight to provider dispatch. Every other image surface checks the controls: /api/v1/images/generations returns 403 when ENABLE_IMAGE_GENERATION is off or features.image_generation is denied, and the edit_image built-in tool and chat image-edit middleware check ENABLE_IMAGE_EDIT and the same permission.
A non-admin user sends a JSON body with a base64 image, a prompt and a model such as gpt-image-1. The server forwards it to the configured OpenAI-compatible, Gemini or ComfyUI provider and returns the edited image, even when the admin set ENABLE_IMAGE_EDIT=False or denied the user the permission. The UI exposes image editing only to admins (Playground), so this reaches an admin-only capability.
The damage is limited. No other user's data is exposed, and the provider keys, such as IMAGES_EDIT_OPENAI_API_KEY, are never returned. What the attacker gets is the bypass of the control and provider spend charged to the admin. The CVSS score is 4.3, with low availability impact.
Who is affected
The open-webui pip package, versions >= 0.8.11, < 0.10.0. The advisory says the route was ungated from its introduction. Instances matter most when an image-edit provider is configured with paid credentials and the instance has users beyond admins.
pip show open-webuiFor Docker, check the image tag.
open-webui
- Ecosystem
- PyPI
- Affected
- >= 0.8.11, < 0.10.0
- Fixed in
- 0.10.0
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.10.0.
pip install --upgrade open-webui==0.10.0The fix is pull request 26009. A thin /edit route now enforces ENABLE_IMAGE_EDIT and the per-user features.image_generation permission, then calls the shared image_edits() implementation. The tool and the chat middleware call the implementation directly, so they are unchanged. The advisory gives no workaround. If you cannot upgrade, block POST /api/v1/images/edit at the reverse proxy for non-admin users, and set a spend cap with the provider.
How to tell if you were hit
Search access logs for POST /api/v1/images/edit from non-admin accounts, and especially any that succeeded while ENABLE_IMAGE_EDIT is False. Compare image-edit usage and spend at the provider (OpenAI, Gemini or ComfyUI) with the users who are allowed to edit images.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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=Falseadministrator control; - bypass a denied per-user/group
features.image_generationpermission; - 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_KEYfor 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:
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.
Credited to jagstack, Classic298.
Questions
- Does CVE-2026-59227 leak the provider API key?
No. The advisory says provider credentials are never returned to the caller. The attacker only causes the server to use them for billable edit requests.
- Does it work when image editing is turned off?
Yes. Setting
ENABLE_IMAGE_EDIT=Falsedid not stop the direct route, because it never checked that switch.- Which versions are affected?
From 0.8.11, where the route was added, up to but not including 0.10.0.
- Is it exploited in the wild?
No source I read says so, and it is not in CISA's KEV catalog.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
