# CVE-2024-3098: Prompt Injection leading to Arbitrary Code Execution in run-llama/llama_index

- Severity: Critical 9.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.95%, higher than 62% of CVEs (2026-12-01)
- Published: 2024-04-10T17:07:56.501Z
- Modified: 2026-10-27T17:45:03.951Z
- Also known as: GHSA-wvpx-g427-q9wc, PYSEC-2026-397
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: @huntr_ai

## Description

A vulnerability was identified in the `exec_utils` class of the `llama_index` package, specifically within the `safe_eval` function, allowing for prompt injection leading to arbitrary code execution. This issue arises due to insufficient validation of input, which can be exploited to bypass method restrictions and execute unauthorized code. The vulnerability is a bypass of the previously addressed CVE-2023-39662, demonstrated through a proof of concept that creates a file on the system by exploiting the flaw.

(As written by CVE List.)

## Affected

- run-llama run-llama/llama_index: from unspecified before 0.10.24
- run-llama llama_index: before 0.10.24
- llama-index-core (PyPI): before 0.10.24

## Every score

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

## References

- <https://huntr.com/bounties/1bce0d61-ad03-4b22-bc32-8f99f92974e7> (web)
- <https://github.com/run-llama/llama_index/commit/5fbcb5a8b9f20f81b791c7fc8849e352613ab475> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-3098> (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-397.yaml> (web)
- <https://github.com/run-llama/llama_index> (package)
- <https://pypi.org/project/llama-index-core> (package, web)
- <https://github.com/advisories/GHSA-wvpx-g427-q9wc> (advisory)

## Sources

- CVE List: [CVE-2024-3098](https://www.cve.org/CVERecord?id=CVE-2024-3098), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-wvpx-g427-q9wc](https://github.com/advisories/GHSA-wvpx-g427-q9wc), CC-BY-4.0, modified 2026-10-27
- NVD: [CVE-2024-3098](https://nvd.nist.gov/vuln/detail/CVE-2024-3098), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-397](https://osv.dev/vulnerability/PYSEC-2026-397), CC-BY-4.0, modified 2026-07-01

---

Page: https://cve.day/CVE-2024-3098 · Whole record: https://cve.day/CVE-2024-3098.json · Rebuilt by cve.day 2026-11-25T22:58:39.061Z
