Browse / Direct Prompt Injection / CVE-2024-12366
PandasAI interactive prompt function Remote Code Execution (RCE)
- Class
- Direct Prompt Injection (filed by a model that read the advisory)
- Technique
- Code and command execution
- Also involves
- Tool and Agent Misuse
- Affected
- pandasai (PyPI)
- Gets past
- Prompt guardrail or safety filter
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 1.2% chance of exploitation in 30 days
How it works, in short
Crafted natural-language prompts can make the LLM emit Python that PandasAI runs without adequate checks, giving the attacker code execution on the host. (Our summary, written by a model. The source text is below.)
Details
PandasAI uses an interactive prompt function that is vulnerable to prompt injection and run arbitrary Python code that can lead to Remote Code Execution (RCE) instead of the intended explanation of the natural language processing by the LLM. The security controls of PandasAI (2.4.3 and earlier) fail to distinguish between legitimate and malicious inputs, allowing the attackers to manipulate the system into executing untrusted code, leading to untrusted code execution (RCE), system compromise, or pivoting attacks on connected services.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-12366
- https://docs.getpanda.ai/v3/privacy-security
- https://docs.pandas-ai.com/advanced-security-agent
- https://github.com/pypa/advisory-database/tree/main/vulns/pandasai/PYSEC-2026-448.yaml
- https://github.com/sinaptik-ai/pandas-ai
- https://pypi.org/project/pandasai
- https://www.kb.cert.org/vuls/id/148244
Source: GitHub Advisory Database, used under CC BY 4.0.