af51217 fix: enforce ownership and access grant checks on model import
3696e86 merge: resolve conflicts with upstream async DB migration
55ed331 fix: add missing await on filter_allowed_access_grants in import_models
📊 Changes
1 file changed (+48 additions, -1 deletions)
View changed files
📝backend/open_webui/routers/models.py (+48 -1)
📄 Description
The model import endpoint allowed any user with workspace.models_import permission to overwrite existing models without verifying ownership or write access, and without filtering access grants through filter_allowed_access_grants.
Now enforces the same ownership/write-access check used by update_model_by_id, and applies filter_allowed_access_grants to both new and updated models during import.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
Note
Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/23628
**Author:** [@Classic298](https://github.com/Classic298)
**Created:** 4/12/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix/model-import-ownership-check`
---
### 📝 Commits (3)
- [`af51217`](https://github.com/open-webui/open-webui/commit/af51217b81328fa6d208f5dbcb2dfefd918f0914) fix: enforce ownership and access grant checks on model import
- [`3696e86`](https://github.com/open-webui/open-webui/commit/3696e86729761d5b0ef6d387796dca79242cad07) merge: resolve conflicts with upstream async DB migration
- [`55ed331`](https://github.com/open-webui/open-webui/commit/55ed331f4deeb4350d58e6a06a9820048c331cc3) fix: add missing await on filter_allowed_access_grants in import_models
### 📊 Changes
**1 file changed** (+48 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/models.py` (+48 -1)
</details>
### 📄 Description
The model import endpoint allowed any user with workspace.models_import permission to overwrite existing models without verifying ownership or write access, and without filtering access grants through filter_allowed_access_grants.
Now enforces the same ownership/write-access check used by update_model_by_id, and applies filter_allowed_access_grants to both new and updated models during import.
### Contributor License Agreement
<!--
🚨 DO NOT DELETE THE TEXT BELOW 🚨
Keep the "Contributor License Agreement" confirmation text intact.
Deleting it will trigger the CLA-Bot to INVALIDATE your PR.
Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA.
-->
- [X] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
> [!NOTE]
> Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23628
Author: @Classic298
Created: 4/12/2026
Status: ❌ Closed
Base:
dev← Head:fix/model-import-ownership-check📝 Commits (3)
af51217fix: enforce ownership and access grant checks on model import3696e86merge: resolve conflicts with upstream async DB migration55ed331fix: add missing await on filter_allowed_access_grants in import_models📊 Changes
1 file changed (+48 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/models.py(+48 -1)📄 Description
The model import endpoint allowed any user with workspace.models_import permission to overwrite existing models without verifying ownership or write access, and without filtering access grants through filter_allowed_access_grants.
Now enforces the same ownership/write-access check used by update_model_by_id, and applies filter_allowed_access_grants to both new and updated models during import.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.