CVE-2024-3271: llama-index-core Command Injection vulnerability
A command injection vulnerability exists in the run-llama/llama_index repository, specifically within the safe_eval function. Attackers can bypass the intended security mechanism, which checks for the presence of underscores in code generated by LLM, to execute arbitrary code.
What it is
A command injection vulnerability exists in the run-llama/llama_index repository, specifically within the safe_eval function. Attackers can bypass the intended security mechanism, which checks for the presence of underscores in code generated by LLM, to execute arbitrary code. This is achieved by crafting input that does not contain an underscore but still results in the execution of OS commands. The vulnerability allows for remote code execution (RCE) on the server hosting the application.
How to check
- Affected: llama-index-core (pip) < 0.10.24.
- Compare your installed version with the range above (command below).
How to fix
- Upgrade llama-index-core to 0.10.24 or later.
pip show llama-index-core | grep Version Sources
- criticalCVE-2025-1793: llama_index vulnerable to SQL Injection
- criticalCVE-2024-45201: LlamaIndex includes an exec call for `import {cls_name}`
- highCVE-2026-114510: poisoned documents can inject Cypher into Flexible GraphRAG's FalkorDB adapter and wipe the graph, upgrade to 0.8.2
- mediumAuth0 AI FGA retrievers let documents denied by Auth0 FGA into the RAG context (CVE-2026-108167, CVE-2026-107372)