{"id":"CVE-2024-7034","summary":"Remote Code Execution due to Arbitrary File Write in open-webui/open-webui","details":"In open-webui version 0.3.8, the endpoint `/models/upload` is vulnerable to arbitrary file write due to improper handling of user-supplied filenames. The vulnerability arises from the usage of `file_path = f\"{UPLOAD_DIR}/{file.filename}\"` without proper input validation or sanitization. An attacker can exploit this by manipulating the `file.filename` parameter to include directory traversal sequences, causing the resulting `file_path` to escape the intended `UPLOAD_DIR` and potentially overwrite arbitrary files on the system. This can lead to unauthorized modifications of system binaries, configuration files, or sensitive data, potentially enabling remote command execution.","modified":"2026-09-02T21:40:36.619432426Z","published":"2025-03-20T10:10:48.964Z","database_specific":{"cwe_ids":["CWE-22"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/7xxx/CVE-2024-7034.json","cna_assigner":"@huntr_ai"},"references":[{"type":"WEB","url":"https://huntr.com/bounties/711beada-10fe-4567-9278-80a689da8613"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/7xxx/CVE-2024-7034.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7034"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/open-webui/open-webui","events":[{"introduced":"9bcd4ce5c0a01af68c0d2aa44554a68bb741c61b"},{"last_affected":"9bcd4ce5c0a01af68c0d2aa44554a68bb741c61b"}],"database_specific":{"cpe":"cpe:2.3:a:openwebui:open_webui:0.3.8:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0.3.8"},{"last_affected":"0.3.8"}],"source":"CPE_STRING"}}],"versions":["0.3.8","v0.3.8"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-7034.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H"}]}