PYSEC-2026-396
Vulnerability from pysec - Published: 2026-06-29 11:50 - Updated: 2026-07-01 20:22A 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.
| Name | purl | llama-index-core | pkg:pypi/llama-index-core |
|---|
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "llama-index-core",
"purl": "pkg:pypi/llama-index-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.10.24"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.10.0",
"0.10.1",
"0.10.10",
"0.10.11",
"0.10.11.post1",
"0.10.12",
"0.10.13",
"0.10.14",
"0.10.14.post1",
"0.10.15",
"0.10.16",
"0.10.16.post1",
"0.10.17",
"0.10.18",
"0.10.18.post1",
"0.10.19",
"0.10.2",
"0.10.20",
"0.10.20.post1",
"0.10.20.post2",
"0.10.20.post3",
"0.10.21",
"0.10.21.post1",
"0.10.22",
"0.10.23",
"0.10.23.post1",
"0.10.24a1",
"0.10.3",
"0.10.5",
"0.10.5a1",
"0.10.5a10",
"0.10.5a2",
"0.10.5a3",
"0.10.5a4",
"0.10.5a5",
"0.10.5a6",
"0.10.5a7",
"0.10.5a8",
"0.10.5a9",
"0.10.6",
"0.10.6.post1",
"0.10.7",
"0.10.8",
"0.10.8.post1",
"0.10.9",
"0.9.41",
"0.9.42",
"0.9.42.post3",
"0.9.43",
"0.9.44",
"0.9.44.post1",
"0.9.44.post2",
"0.9.44.post3",
"0.9.45",
"0.9.46",
"0.9.47",
"0.9.48",
"0.9.49",
"0.9.50",
"0.9.50.post1",
"0.9.51",
"0.9.52",
"0.9.53",
"0.9.54",
"0.9.55",
"0.9.56"
]
}
],
"aliases": [
"CVE-2024-3271",
"GHSA-r6gp-rff2-p3hf"
],
"details": "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.",
"id": "PYSEC-2026-396",
"modified": "2026-07-01T20:22:56.484978Z",
"published": "2026-06-29T11:50:39.698454Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-3271"
},
{
"type": "WEB",
"url": "https://github.com/run-llama/llama_index/commit/2c92e88838a5f481d50840240b1dd3180066c6f5"
},
{
"type": "WEB",
"url": "https://github.com/run-llama/llama_index/commit/5fbcb5a8b9f20f81b791c7fc8849e352613ab475"
},
{
"type": "PACKAGE",
"url": "https://github.com/run-llama/llama_index"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/9b32490e-7cf9-470e-8d49-ba083ae7a279"
},
{
"type": "PACKAGE",
"url": "https://pypi.org/project/llama-index-core"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-r6gp-rff2-p3hf"
}
],
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "llama-index-core Command Injection vulnerability"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.