CVE-2024-7034: Remote Code Execution due to Arbitrary File Write in open-webui/open-webui
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 filepath = f"{UPLOADDIR}/{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 filepath to escape the intended UPLOADDIR 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-7034?
CVE-2024-7034 has a medium severity level due to the potential for arbitrary file write vulnerabilities.
How do I fix CVE-2024-7034?
To fix CVE-2024-7034, ensure proper validation and sanitization of user-supplied filenames before handling file uploads.
What software is affected by CVE-2024-7034?
CVE-2024-7034 affects version 0.3.8 of open-webui.
What is the impact of CVE-2024-7034?
The impact of CVE-2024-7034 includes unauthorized file writing which can lead to data corruption or further exploitation.
Is CVE-2024-7034 a known vulnerability?
Yes, CVE-2024-7034 is a known vulnerability that has been documented and reported.