CVE-2024-3098: llama-index-core Prompt Injection vulnerability leading to Arbitrary Code Execution
CVE-2024-3098 · Severity: critical · CVSS 9.8 · Published 2024-04-10
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.
Yes. llama-index-core (PyPI): upgrade to 0.10.24 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2024-3098?
Check whether you run llama-index-core (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
llama-index-core (PyPI): upgrade to 0.10.24 or later