Skip to content
RCE Disclosed report Intermediate CVE-2024-4181

RunGptLLM class in LlamaIndex has a command injection

The RunGptLLM class in llama_index used the eval function improperly, allowing a malicious or compromised LLM hosting provider to execute arbitrary commands on the client's machine. This could lead to full control over client machines.

run-llama/llama_index

Originally disclosed on huntr

A command injection vulnerability exists in the RunGptLLM class of the llama_index library, version 0.9.47, used by the RunGpt framework from JinaAI to connect to Language Learning Models (LLMs). The vulnerability arises from the improper use of the eval function, allowing a malicious or compromised LLM hosting provider to execute arbitrary commands on the client's machine. This issue was fixed in version 0.10.13. The exploitation of this vulnerability could lead to a hosting provider gaining full control over client machines.

From the GitHub Advisory Database (GHSA-pw38-xv9x-h8ch, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the RunGptLLM class passed untrusted input from the LLM provider into eval, which executes arbitrary code.

Impact

A malicious or compromised LLM hosting provider could gain full control over client machines.

What the attacker needed

Use llama_index 0.9.47; connect to a malicious LLM provider

The fix

It was fixed in version 0.10.13.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a command injection bug. The library used a function called eval that runs text as code, so if an attacker controlled the text, they could run their own commands on your computer. The fix was to stop using eval in that way.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from run-llama/llama_index

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.