CVE-2024-12366 CVE-2024-12366

Critical 9.8 Published Updated

Attackers can inject prompts to execute arbitrary Python code via PandasAI's interactive prompt function, leading to remote code execution.

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-12366?

CVE-2024-12366 is a critical code injection vulnerability in Sinaptik AI PandasAI, published on 11 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Which versions are affected by CVE-2024-12366?

3 open source packages ship an affected version, including pandasai.

PackageAffectedFixed in
pandasai PyPIAll versions to 2.4.2None
pandasai PyPIAll versions to 2.4.2None
pandasai PyPIAll versions to 2.4.2None

How do I fix CVE-2024-12366?

No fix has been published for CVE-2024-12366 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-12366 being exploited?

There is no known exploitation of CVE-2024-12366 in the wild and no public exploit code.

Sources

Also known as GHSA-vv2h-2w3q-3fx7, PYSEC-2026-448.

Is CVE-2024-12366 in your software?

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

Check your SBOMs for free