CVE-2024-23752 Code execution in pandasai

Critical 9.8 Published Updated

Attackers can execute arbitrary Python code by crafting specific dataframes in PandasAI, leading to potential system compromise.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-23752?

CVE-2024-23752 is a critical code injection vulnerability in n/a, published on 22 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-862

Which versions are affected by CVE-2024-23752?

3 open source packages ship an affected version, including pandasai. It affects 1 product.

PackageAffectedFixed in
pandasai PyPIAll versions to 1.5.17None
pandasai PyPIAll versions to 1.5.17None
pandasai PyPIAll versions to 1.5.17None

Products include Gabrieleventuri Pandasai.

How do I fix CVE-2024-23752?

No fix has been published for CVE-2024-23752 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-23752 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-23752 exists.

Sources

Also known as GHSA-5g73-69p4-7gvx, PYSEC-2026-446.

Is CVE-2024-23752 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free