Documented Incident · INC-2024-4181 · High severity
LlamaIndex RunGptLLM Command Injection via Unvalidated Model Arguments
CVE-2024-4181 affected the `RunGptLLM` wrapper integration in LlamaIndex (`<= 0.9.47`), where model arguments were passed unsafely into system execution contexts. Untrusted configuration or prompt-derived arguments could inject shell metacharacters, triggering arbitrary OS command execution on hosts running the connector. The flaw illustrated how third-party model adapters often skip basic command neutralization when shelling out to local binaries. Maintainers patched argument handling and advised auditing connector wrappers for `subprocess` shells.
Incident dossier metadata
- Case ID
INC-2024-4181- Classification
- Incident
- Date
- Severity
- High
- Sector
- Software Development & AI Tooling
- Attack vector
- Tool/MCP Abuse
- System type
- LLM Wrapper & Local Execution Integrations
- CVE / reference
CVE-2024-4181- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-4181
Defensive takeaway
Audit third-party LLM model adapters for shell=True invocations and validate model parameters strictly before invoking subprocesses.
Mapped AI security techniques
- Supply Chain Compromise: Software AML.T0010.001
- Command and Scripting Interpreter AML.T0050
- AI Agent Tool Invocation AML.T0053
Mapped defensive controls
- Restrict Library Loading AML.M0011
- Vulnerability Scanning AML.M0016
- Enforce Access Controls for AI Agent Tools AML.M0028
Source citation records
- NVD Record CVE-2024-4181: LlamaIndex RunGptLLM Command Injection · NIST National Vulnerability Database (NVD) ·