Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LlamaIndex

CVE-2024-3271: llama-index-core Command Injection vulnerability

criticalCVSS 3.0 9.8GHSA-r6gp-rff2-p3hf

A command injection vulnerability exists in the run-llama/llamaindex repository, specifically within the safeeval 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.

Published Apr 16, 2024

Affected packages

llama-index-core

Ecosystem
PyPI
Affected
< 0.10.24
Fixed in
0.10.24
Check
pip show llama-index-core

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More LlamaIndex vulnerabilities

All LlamaIndex entries