---
id: "CVE-2024-23752"
page: "https://infrastack.ai/live/CVE-2024-23752"
kind: "vulnerability"
aliases: ["CVE-2024-23752", "GHSA-5g73-69p4-7gvx"]
title: "Code execution in pandasai"
severity: "critical"
cvss: 9.8
epss: 0.01015
exploited: false
status: "open"
category: "package"
products: [{"name": "pandasai", "fixed": [], "affected": "<= 1.5.17", "ecosystem": "pypi"}, {"name": "gabrieleventuri pandasai", "fixed": [], "affected": "<= 1.5.17", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["cwe-862", "cwe-94", "data-analysis", "package", "pandasai", "python"]
not_affected_if: ["no-untrusted-input", "synthetic-dataframe-unused"]
published_at: "2024-01-22T01:15:08+00:00"
first_seen_at: "2026-11-16T15:53:12+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-5g73-69p4-7gvx", "first_seen_at": "2026-11-16T15:53:12+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23752", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.01015, "url": "https://api.first.org/data/v1/epss?cve=CVE-2024-23752"}]
---

# Code execution in pandasai

Link for people: https://infrastack.ai/live/CVE-2024-23752 (this .md is for agents)

PandasAI's synthetic dataframe pipeline turns attacker-supplied English descriptions into Python code, which the SDFCodeExecutor then runs. An attacker who can supply such a dataframe specification can execute arbitrary code on the host running PandasAI.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:pandasai affected <= 1.5.17 fixed no fixed version listed
- vendor:gabrieleventuri pandasai affected <= 1.5.17 fixed no fixed version listed

## How to check

- Check the installed version with `pip show pandasai`; versions up to and including `1.5.17` are affected per the sources.
- Look for code that calls GenerateSDFPipeline or synthetic_dataframe with user-supplied input.

## Timeline

- 2026-11-16T15:53:12+00:00 ghsa https://github.com/advisories/GHSA-5g73-69p4-7gvx
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-23752

## Documents

- [advisory] Vendor advisory: github.com https://github.com/gventuri/pandas-ai/issues/868

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
