CVE-2024-3098CWE-94

Prompt Injection leading to Arbitrary Code Execution in run-llama/llama_index

Critical · published April 10, 2024

CVSS v3.0
9.8
EPSS
1%
Percentile
61.1
In the wild
Unconfirmed
What it is

🚨 A tiny oversight in the `exec_utils` class is a ticket for trouble! The `safe_eval` function in the `llama_index` package is letting malicious prompts slip through, allowing for arbitrary code execution. 🔥 Think of the `safe_eval` function like a security desk at an exclusive event — it should verify guests before letting them in. But if the desk skips checking IDs, anyone can sneak in and alter the event in unexpected ways! This vulnerability could have absolutely devastating consequences! An attacker could execute unauthorized code on the system, creating files and potentially leading to a complete compromise of the environment. With the stakes this high, ignoring it is like leaving the front door open during a heist!

Put simply

Think of the `safe_eval` function like a security desk at an exclusive event — it should verify guests before letting them in. But if the desk skips checking IDs, anyone can sneak in and alter the event in unexpected ways! The vulnerability in the `exec_utils` class enables prompt injection due to insufficient input validation in the `safe_eval` function. This flaw allows attackers to bypass method restrictions and execute arbitrary code on the system, reminiscent of the earlier addressed CVE-2023-39662.

What to do

This vulnerability could have absolutely devastating consequences! An attacker could execute unauthorized code on the system, creating files and potentially leading to a complete compromise of the environment. With the stakes this high, ignoring it is like leaving the front door open during a heist! To remediate this issue, immediately update the `llama_index` package to the latest version that addresses this vulnerability. Additionally, review all instances of `safe_eval` usage in your code to ensure proper input validation is enforced. Don’t wait—secure your environment now! You've got this! Follow these steps and you'll have your system locked down tighter than a vault! 🛡️

The record
Technical detail
CVSS v3.0
9.8 · CRITICAL
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00959 · 61.1th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2024-04-10T17:07Z
EPSS history
Timeline
  • 10 APR 17:07Z
    Prompt Injection leading to Arbitrary Code Execution in run-llama/llama_index
    cvelistv5