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).
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.