A vulnerability in the parisneo/lollms-webui allows for arbitrary file upload and read due to insufficient sanitization of user-supplied input. Specifically, the issue resides in the `install_model()` function within `lollms_core/lollms/binding.py`, where the application fails to properly sanitize the `file://` protocol and other inputs, leading to arbitrary read and upload capabilities. Attackers can exploit this vulnerability by manipulating the `path` and `variant_name` parameters to achieve path traversal, allowing for the reading of arbitrary files and uploading files to arbitrary locations on the server. This vulnerability affects the latest version of parisneo/lollms-webui.
The vulnerability is located in the `install_model()` function in the `lollms_core/lollms/binding.py` file. The application does not properly filter the `file://` protocol or other user-supplied values. By manipulating the `path` and `variant_name` parameters, an attacker can perform a path traversal attack, breaking out of the permitted application directory. As a result, it is possible to both read arbitrary files from the server's file system and write (upload) malicious files to any location on the server.
An attacker can read arbitrary files from the server (including potentially credentials, private keys, or configurations) and write files anywhere in the file system, which can lead to full server compromise (RCE via malicious file writes).
Patches available from the vendor should be applied according to the references (https://huntr.com/bounties/cd383817-924a-445a-838e-d0c867c6a176). Until the update is deployed, it is recommended to restrict access to the application only to trusted networks and monitor unauthorized file system access attempts.
The latest version of parisneo/lollms-webui available at the time of vulnerability disclosure (2024-05-16); specific version numbers are indicated in the vendor's references.
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HLollms Web Ui
APPLollms< 9.5
Related vulnerabilities
SSRF i brak uwierzytelnienia w lollms-webui — dostęp do wewnętrznych zasobów
Path traversal w API install/uninstall lollms-webui V12 (Strawberry)
Path Traversal w lollms-webui umożliwia usunięcie dowolnego pliku
Path Traversal i DoS w endpoint /select_database aplikacji lollms-webui
Command Injection w lollms-webui — obejście zabezpieczeń i RCE