LLAMA-INDEX-CORE · CVE-2024-3271 · Package
FIX → 0.10.24 · 0.10.26
llama-index-core's safe_eval function checks LLM-generated code for underscores as its safety filter, and that check can be bypassed. An attacker who can influence the model's output or input can get arbitrary operating system commands run on the server hosting the application.
first public Apr 16, 2024 · 1 public exploit · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Applications that use llama-index-core and pass LLM-generated or user-influenced text into the safe_eval code path are exposed, since the bypass depends on that path being reached. Applications that do not call safe_eval, or that run on a version at or above 0.10.24, are not affected by this advisory.
Not affected if fixed-version, no-safe-eval-path
Who cares ai-apps, llama-index, python, rag
pip show llama-index-core, and look for it in requirements.txt or poetry.lock.safe_eval or code paths that pass LLM output into it.Upgrade to 0.10.24 · 0.10.26
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.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
llama-index-core 0.10.24 (fixed version per the advisory data; earlier versions are affected).GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.