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 | Vendor | Product | Affected 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.
References
- https://github.com/run-llama/llama_index/commit/2c92e88838a5f481d50840240b1dd318...
- https://github.com/advisories/GHSA-r6gp-rff2-p3hf
- https://huntr.com/bounties/9b32490e-7cf9-470e-8d49-ba083ae7a279 URL
- https://nvd.nist.gov/vuln/detail/CVE-2024-3271 Vendor Advisory
- https://github.com/run-llama/llama_index/commit/5fbcb5a8b9f20f81b791c7fc8849e352... Patch
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3271.j... Vendor Advisory
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically
- Gives an attacker full control
Type
CWE-77Command Injection
Timeline
Published16 Apr 2024
Updated30 Oct 2026
First seen6 Mar 2026
Track software like this
Free during beta