CVE-2024-3104 Remote Code Execution in mintplex-labs/anything-llm
Attackers can execute arbitrary code on the host by injecting environment variables via the system update endpoint in AnythingLLM.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2024-3104?
CVE-2024-3104 is a critical command injection vulnerability in Mintplexlabs Anythingllm, published on 6 Jun 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-78
Which versions are affected by CVE-2024-3104?
It affects 1 product.
Products include Mintplexlabs Anythingllm.
How do I fix CVE-2024-3104?
No fix has been published for CVE-2024-3104 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-3104 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-3104 exists.
Other vulnerabilities in Mintplexlabs Anythingllm
- CVE-2024-3025 Path Traversal in mintplex-labs/anything-llm
- CVE-2024-0455 SSRF on AWS deployed instances of AnythingLLM via /metadata
- CVE-2026-32626 AnythingLLM has a Streaming Phase XSS to RCE via LLM Response Injection
- CVE-2024-3149 SSRF in mintplex-labs/anything-llm
- CVE-2024-0765 Default user role exporting save state of instance
Sources
Also known as GHSA-xcfw-58w2-3rxx.