---
title: "CVE-2024-3271: llama-index-core Command Injection vulnerability"
url: https://erroneo.us/security/cve/CVE-2024-3271/
description: "CVE-2024-3271 (llama-index-core (PyPI)): A command injection vulnerability exists in the run-llama/llamaindex repository, specifically within the safeeval…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-04-16
date_modified: 2024-08-01
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-3271"
kev: false
cvss: 9.8
epss: 0.02886
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-3271: llama-index-core Command Injection vulnerability

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 2.9% , percentile 87: FIRST’s model estimates a 2.9% chance of exploitation activity in the next 30 days, higher than 87% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes llama-index-core (PyPI) < 0.10.24, fixed in 0.10.24 . Check your lockfile, including transitive dependencies.

## What it is

A command injection vulnerability exists in the run-llama/llamaindex repository, specifically within the safeeval 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

- PyPI `llama-index-core` < 0.10.24 → fixed: 0.10.24

## Affected products (CVE record)

- run-llama run-llama/llama_index: unspecified < 10.26

## Severity

- @huntr_ai CVSS 3.0: 9.8 `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.8 `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 2.89% probability of exploitation activity in the next 30 days; percentile 87.

## Sources

- [GitHub Advisory GHSA-r6gp-rff2-p3hf](https://github.com/advisories/GHSA-r6gp-rff2-p3hf)
- [CVE.org record CVE-2024-3271](https://www.cve.org/CVERecord?id=CVE-2024-3271)
- [NVD entry CVE-2024-3271](https://nvd.nist.gov/vuln/detail/CVE-2024-3271)
- [huntr.com](https://huntr.com/bounties/9b32490e-7cf9-470e-8d49-ba083ae7a279)
- [github.com](https://github.com/run-llama/llama_index/commit/5fbcb5a8b9f20f81b791c7fc8849e352613ab475)
- [github.com](https://github.com/run-llama/llama_index/commit/2c92e88838a5f481d50840240b1dd3180066c6f5)

---
Source page: https://erroneo.us/security/cve/CVE-2024-3271/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
