INCIDENT MAP

Browse / Improper Output Handling / CVE-2024-23752

Code execution in pandasai

CVE-2024-23752 ยท 2024-01-22 critical

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

Source: GitHub Advisory Database, used under CC BY 4.0.