CVE-2024-3271
CRITICAL 9.8CVSS 3.0llama-index-core Command Injection vulnerability
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.
- Published
- 16 Apr 2024
- Last modified
- 16 Nov 2026
- Assigned by
- security@huntr.dev
- NVD status
- Analyzed
- Weakness
- CWE-77
- Also known as
- GHSA-r6gp-rff2-p3hfPYSEC-2026-396
- Sources
- NVDJSONOSV GHSA-r6gp-rff2-p3hfJSONOSV PYSEC-2026-396JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | CRITICAL 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.0 | CRITICAL 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.0 | CRITICAL 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | llamaindex | llamaindexcpe:2.3:a:llamaindex:llamaindex:*:*:*:*:*:*:*:* |
>= 0.10.6, < 0.10.26 | 0.10.26 |
| OSV | PyPI | llama-index-core | < 0.10.24 | 0.10.24 |
References
- https://github.com/run-llama/llama_index/commit/5fbcb5a8b9f20f81b791c7fc8849e352613ab475 · Patch, WEB
- https://huntr.com/bounties/9b32490e-7cf9-470e-8d49-ba083ae7a279 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-3271 · ADVISORY
- https://github.com/run-llama/llama_index/commit/2c92e88838a5f481d50840240b1dd3180066c6f5 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/llama-index-core/PYSEC-2026-396.yaml · WEB
- https://github.com/run-llama/llama_index · PACKAGE
- https://pypi.org/project/llama-index-core · WEB, PACKAGE
- https://github.com/advisories/GHSA-r6gp-rff2-p3hf · ADVISORY
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 16 Apr 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 29 Jun 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 16 Apr 2024)