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.

Severity (CVSS 3.0)9.8Critical
Exploit odds (30 days)2.9%top 13.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
PyPIllama-index-core0.10.24GHSA-r6gp-rff2-p3hf
PyPIllama-index-core0.10.24PYSEC-2026-396

Affected products (as reported)

VendorProductVersions
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

References