Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
9.8

CVE-2024-3271: Llama‑Index safe_eval can run unwanted commands

CVE-2024-3271 · published 2 years ago
Summary

The safe_eval feature in the Llama‑Index library can be tricked into running system commands, even when the input looks safe. This means an attacker could cause the server hosting the application to execute any code they choose. Apply the latest library updates or stop using safe_eval until the issue is fixed.

What to do
  • Update jerry liu llama-index-core to version 0.10.24.
  • Update llamaindex llamaindex to version 0.10.26 or later.
Affected software
Ecosystem VendorProductAffected versions
pip jerry liu llama-index-core < 0.10.24
Fix: upgrade to 0.10.24
– llamaindex llamaindex >= 0.10.6, < 0.10.26
cpe:2.3:a:llamaindex:llamaindex:*:*:*:*:*:*:*:*
Original advisory text
Command Injection in run-llama/llama_index
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.
Fix within
Internet-facing 3 days
Internal 60 days
  • Not known to be exploited
  • Can be exploited automatically
  • Gives an attacker full control
Severity
9.8 Critical
Exploitation
3% chance of attack within 30 days
Type
CWE-77Command Injection
Timeline
Published16 Apr 2024
Updated30 Oct 2026
First seen6 Mar 2026
Sources
CVE-2024-3271 · NVD
CVE-2024-3271 · OSV
Track software like this
Free during beta