CVE-2024-3104 Remote Code Execution in mintplex-labs/anything-llm

Critical 9.6 Published Updated

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.

All Mintplexlabs Anythingllm vulnerabilities

Sources

Also known as GHSA-xcfw-58w2-3rxx.

Is CVE-2024-3104 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free