mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-26 03:14:08 -05:00
[GH-ISSUE #21124] [Hardening] Supply Chain Security: Verify integrity of auto-downloaded embedding models #139117
Reference in New Issue
Block a user
Originally created by @arsbr on GitHub (Feb 3, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21124
Check Existing Issues
Verify Feature Scope
Problem Description
I am submitting a Security Hardening Recommendation regarding the automatic model download mechanism in
backend/open_webui/retrieval/utils.py.Currently, when
RAG_EMBEDDING_MODELis set, the system downloads the model viahuggingface_huband immediately loads it intoSentenceTransformer. Since these models often rely onpickle(via PyTorch), loading an untrusted model leads to RCE.While I understand that configuring a malicious model URL falls under "Admin Actions" (and is thus out of scope for a vulnerability report), I believe the system should implement Defense in Depth to prevent accidental compromise or MITM attacks during the download process.
The Risk
RAG_EMBEDDING_MODELto a repository that contains a malicious pickle file (e.g., a typosquatted repo or a compromised upstream repo).snapshot_download.SentenceTransformerloads it, executing the payload.There is currently no check for:
Desired Solution you'd like
I suggest adding a verification layer inside
get_model_pathbefore returning the path to the loader.I maintain an open-source library called Veritensor (Apache 2.0) that handles this logic. Even if you do not wish to add a new dependency, the logic can be adapted.
Suggested Implementation (in
backend/open_webui/retrieval/utils.py):@pr-validator-bot commented on GitHub (Feb 3, 2026):
⚠️ Missing Issue Title Prefix
@ArseniiBrazhnyk, your issue title is missing a prefix (e.g.,
bug:,feat:,docs:).Please update your issue title to include one of the following prefixes:
Example:
bug: Login fails when using special characters in password