Browse / Improper Output Handling / CVE-2024-23752
Code execution in pandasai
- Class
- Improper Output Handling (filed by a model that read the advisory)
- Technique
- Code and command execution
- Also involves
- Indirect Prompt Injection
- Affected
- pandasai (PyPI)
- Gets past
- Earlier patch
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 1.0% chance of exploitation in 30 days
How it works, in short
Crafted dataframe descriptions lead the LLM to generate Python that the synthetic data executor runs, getting around earlier restrictions on code execution. (Our summary, written by a model. The source text is below.)
Details
GenerateSDFPipeline in synthetic_dataframe in PandasAI (aka pandas-ai) through 1.5.17 allows attackers to trigger the generation of arbitrary Python code that is executed by SDFCodeExecutor. An attacker can create a dataframe that provides an English language specification of this Python code. NOTE: the vendor previously attempted to restrict code execution in response to a separate issue, CVE-2023-39660.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-23752
- https://github.com/gventuri/pandas-ai/issues/868
- https://github.com/gventuri/pandas-ai
- https://github.com/pypa/advisory-database/tree/main/vulns/pandasai/PYSEC-2026-446.yaml
- https://pypi.org/project/pandasai
Source: GitHub Advisory Database, used under CC BY 4.0.