CVE-2025-1753 Command Injection in LLama-Index CLI in run-llama/llama_index
Attackers can execute arbitrary shell commands via the CLI files argument, leading to code execution on systems using the library.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-1753?
CVE-2025-1753 is a high-severity command injection vulnerability in run-llama/llama_index, published on 28 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
LLama-Index CLI version v0.12.20 contains an OS command injection vulnerability. The vulnerability arises from the improper handling of the `--files` argument, which is directly passed into `os.system`. An attacker who controls the content of this argument can inject and execute arbitrary shell commands. This vulnerability can be exploited locally if the attacker has control over the CLI arguments, and remotely if a web application calls the LLama-Index CLI with a user-controlled filename. This issue can lead to arbitrary code execution on the affected system.
Weakness: CWE-78
Which versions are affected by CVE-2025-1753?
4 open source packages ship an affected version, including llama-index-cli and llama-index. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
llama-index-cli PyPI | All versions | 0.4.1 |
llama-index-cli PyPI | All versions | 0.4.1 |
llama-index-cli PyPI | All versions | 0.4.1 |
llama-index PyPI | All versions to 0.12.20 | None |
Products include Llamaindex Llamaindex.
How do I fix CVE-2025-1753?
Upgrade llama-index-cli to 0.4.1 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2025-1753 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1753 exists.
Other vulnerabilities in run-llama/llama_index
Sources
Also known as GHSA-g99h-56mw-8263, PYSEC-2025-246, PYSEC-2026-1557.