Incident report

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 record

Reported
Severity
High
Vector
Tool/MCP Abuse
Affected system type
LLM Wrapper & Local Execution Integrations
Reference
CVE-2024-4181
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-4181

Inspect in Interactive Incidents Hub

Defensive lesson

Audit third-party LLM model adapters for shell=True invocations and validate model parameters strictly before invoking subprocesses.

Referenced techniques