Skip to content
Path traversal Disclosed report Intermediate CVE-2024-7037

open-webui allows writing and deleting arbitrary files

The upload endpoint concatenated an unsanitised filename with a cache directory, allowing path traversal. An attacker could write or delete arbitrary files, potentially leading to remote code execution.

open-webui/open-webui

Originally disclosed on huntr

In version v0.3.8 of open-webui/open-webui, the endpoint /api/pipelines/upload is vulnerable to arbitrary file write and delete due to unsanitized file.filename concatenation with CACHE_DIR. This vulnerability allows attackers to overwrite and delete system files, potentially leading to remote code execution.

From the GitHub Advisory Database (GHSA-54f4-v6v9-9q82, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application concatenated the user-controlled filename with a fixed cache directory without sanitising path traversal sequences.

Impact

An attacker could overwrite and delete system files, potentially leading to remote code execution.

What the attacker needed

Access to the upload endpoint

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a web app saves an uploaded file, it should keep it inside a safe folder. Here, the app joined the user-supplied filename directly onto a folder path without cleaning it, so a name containing '..' could escape that folder. That let an attacker create or remove files anywhere the app could reach, which can be very dangerous.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from open-webui/open-webui

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.