LlamaIndexGHSA-r6gp-rff2-p3hf
llama-index-core Command Injection vulnerability
Critical9.8CVE-2024-3271 · Published Apr 16, 2024 · updated Jun 29, 2026
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.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| llama-index-core PyPI | < 0.10.24 | 0.10.24 |
Details and references
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-77
- Also known as
- CVE-2024-3271, PYSEC-2026-396
More LlamaIndex advisories
All LlamaIndex| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Mar 202025 | LlamaIndex Improper Handling of Exceptional Conditions vulnerability | High7.5 | 0.12.6 |
| Aug 222024 | LlamaIndex includes an exec call for `import {cls_name}` | Critical9.8 | 0.10.38 |
| May 162024 | RunGptLLM class in LlamaIndex has a command injection | High8.8 | 0.10.13 |
| Apr 102024 | llama-index-core Prompt Injection vulnerability leading to Arbitrary Code Execution | Critical9.8 | 0.10.24 |
| Jan 222024 | SQL injection in llama-index | Critical9.8 | No fix yet |
| Aug 152023 | llama-index vulnerable to arbitrary code execution | Critical9.8 | 0.9.14 |