Vulnerability · Published Apr 16, 2024 · Assigned by @huntr_ai
CVE-2024-3271Command Injection in run-llama/llama_index
Critical 9.8
In plain English
A critical-severity command injection in run-llama/llama_index from run-llama. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.9% (higher than 87% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | llama-index-core | 0.10.24 | GHSA-r6gp-rff2-p3hf |
| PyPI | llama-index-core | 0.10.24 | PYSEC-2026-396 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| run-llama | run-llama/llama_index | unspecified – before 10.26 |
Weakness: CWE-77 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H