CVE-2024-4181: RunGptLLM class in LlamaIndex has a command injection
The RunGptLLM class in LlamaIndex used eval on data streamed from the LLM host. A malicious or compromised RunGPT provider could run commands on the client. Upgrade llama-index to 0.10.13 and llama-index-llms-rungpt to 0.1.3.
Published May 16, 2024 · Updated May 24, 2024 · Analysis Nov 2, 2026
What an attacker can do
RunGptLLM is the client for the RunGPT framework from JinaAI. In its streaming code, inner gen() functions in stream_complete and stream_chat called json.loads(json.dumps(eval(item.data))) on each streamed event. That evaluates text the remote server sends as Python code.
The attacker is therefore the model host, or anyone who can sit between you and it. A hosting provider that is malicious or breached, or a network position that can alter the stream, can return event data that runs on your machine. The CVSS vector (8.8) lists user interaction as required: the victim must use the streaming calls against that server. The advisory says this could give the provider full control of the client machine.
An app that calls RunGptLLM from an agent or notebook runs with that user's files, tokens and cloud credentials, so a hit exposes all of them. Only users of the RunGPT integration are affected, not other LlamaIndex LLM classes.
Who is affected
Two pip packages: llama-index before 0.10.13, and llama-index-llms-rungpt before 0.1.3. The advisory description names version 0.9.47 as the one tested. You are exposed only if your code uses RunGptLLM with stream_complete or stream_chat. Check:
pip show llama-index llama-index-llms-rungptSearch your code for RunGptLLM.
llama-index
- Ecosystem
- PyPI
- Affected
- < 0.10.13
- Fixed in
- 0.10.13
- Check
pip show llama-index
llama-index-llms-rungpt
- Ecosystem
- PyPI
- Affected
- < 0.1.3
- Fixed in
- 0.1.3
- Check
pip show llama-index-llms-rungpt
How to fix it
Upgrade llama-index to 0.10.13 and llama-index-llms-rungpt to 0.1.3.
pip install --upgrade "llama-index>=0.10.13" "llama-index-llms-rungpt>=0.1.3"The fix commit replaces the eval call with item_dict = dict(item.data) in both streaming methods and removes the unused json import. The sources give no workaround. If you cannot upgrade, stop using RunGptLLM streaming against servers you do not control.
How to tell if you were hit
Grep your environment for rungpt/base.py containing eval( to confirm a vulnerable build. Review the process tree and network activity of the application that used RunGptLLM for shells, curl or unexpected child processes. Check which RunGPT hosts the app connected to, and whether any is not one you operate. Review shell history and new files on machines where agents ran streaming calls against third-party hosts.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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.
Questions
- Who can exploit CVE-2024-4181?
The server your client talks to, or an attacker who can alter that traffic. The advisory describes a malicious or compromised LLM hosting provider.
- Am I affected if I use other LlamaIndex LLMs?
The flaw is in the RunGptLLM class in the llama-index-llms-rungpt package. Other LLM integrations are not part of this advisory.
- Which versions are fixed?
llama-index 0.10.13 and llama-index-llms-rungpt 0.1.3.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More LlamaIndex vulnerabilities
All LlamaIndex entriesCVE-2025-6208
llama-index-core vulnerable to Uncontrolled Resource Consumption
medium5.3Feb 2, 2026CVE-2025-7707
llama-index has Insecure Temporary File
high7.1Oct 13, 2025CVE-2025-7647
llama-index-core insecurely handles temporary files
high7.3Sep 27, 2025CVE-2025-5302
LlamaIndex affected by a Denial of Service (DOS) in JSONReader
high8.6Aug 26, 2025CVE-2025-6211
LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class
medium6.5Jul 10, 2025CVE-2025-3108
LlamaIndex has Incomplete Documentation of Program Execution related to JsonPickleSerializer component
medium5.0Jul 7, 2025
