A remote code execution vulnerability exists in mintplex-labs/anything-llm due to improper handling of environment variables. Attackers can exploit this vulnerability by injecting arbitrary environment variables via the `POST /api/system/update-env` endpoint, which allows for the execution of arbitrary code on the host running anything-llm. The vulnerability is present in the latest version of anything-llm, with the latest commit identified as fde905aac1812b84066ff72e5f2f90b56d4c3a59. This issue has been fixed in version 1.0.0. Successful exploitation could lead to code execution on the host, enabling attackers to read and modify data accessible to the user running the service, potentially leading to a denial of service.
An attacker sends an HTTP POST request to the `/api/system/update-env` endpoint, injecting arbitrary environment variables (command injection, CWE-78). The application incorrectly processes the passed data, resulting in execution of arbitrary code on the server hosting the AnythingLLM service. The vulnerability was present in the latest version of the application at that time (commit fde905aac1812b84066ff72e5f2f90b56d4c3a59) and was fixed in version 1.0.0.
Successful exploitation of the vulnerability allows an attacker to execute arbitrary code on the host, read and modify data available to the service account, and potentially cause denial of service (DoS).
AnythingLLM should be immediately updated to version 1.0.0 or later, in which the vulnerability has been removed. Fix available in commit bfedfebfab032e6f4d5a369c8a2f947c5d0c5286 in the manufacturer's GitHub repository.
Mintplex Labs AnythingLLM — versions prior to 1.0.0 (all versions up to and including commit fde905aac1812b84066ff72e5f2f90b56d4c3a59)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HMintplexlabs Anythingllm
APPMintplexlabs< 1.0.0
Related vulnerabilities
XSS eskalujący do RCE w AnythingLLM Desktop poprzez podatny renderer Electron
Nieprawidłowa kontrola dostępu w AnythingLLM — nieautoryzowana manipulacja bazą danych
Brak autoryzacji w AnythingLLM — destrukcyjny dostęp do VectorDB
Mass assignment w anything-llm umożliwia nieautoryzowane tworzenie kont admin
Path Traversal w AnythingLLM — odczyt i usunięcie plików przez logo filename