---
id: "CVE-2024-12366"
page: "https://infrastack.ai/live/CVE-2024-12366"
kind: "vulnerability"
aliases: ["CVE-2024-12366", "GHSA-vv2h-2w3q-3fx7"]
title: "PandasAI interactive prompt function Remote Code Execution (RCE)"
severity: "critical"
cvss: 9.8
epss: 0.01214
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "pandasai", "fixed": [], "affected": "<= 2.4.2", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["ai-tooling", "cwe-94", "data-analysis", "llm", "pandasai", "python"]
not_affected_if: ["no-user-prompt-input"]
published_at: "2025-02-11T13:15:29+00:00"
first_seen_at: "2026-11-16T15:48:11+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-vv2h-2w3q-3fx7", "first_seen_at": "2026-11-16T15:48:11+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12366", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.01214, "url": "https://api.first.org/data/v1/epss?cve=CVE-2024-12366"}]
---

# PandasAI interactive prompt function Remote Code Execution (RCE)

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

PandasAI's interactive prompt function can be tricked by prompt injection into running arbitrary Python code on the host. An attacker who controls prompt input can achieve remote code execution and pivot to connected services.

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

## Affected

- pypi:pandasai affected <= 2.4.2 fixed no fixed version listed

## How to check

- Check the installed version with `pip show pandasai`; versions `2.4.2` and earlier are listed as affected.
- Look for applications that call the PandasAI interactive prompt function with user-supplied text.

## Fix

- `pandasai` (pypi): fixed version unknown; sources list affected versions up to `2.4.2` and state no fixed version in the product data.

## Timeline

- 2026-11-16T15:48:11+00:00 ghsa https://github.com/advisories/GHSA-vv2h-2w3q-3fx7
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-12366

## From the sources

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. The security controls of PandasAI (2.4.3 and earlier) fail to distinguish between legitimate and malicious inputs, allowing the attackers to manipulate the system into executing untrusted code, leading to untrusted code execution (RCE), system compromise, or pivoting attacks on connected services.

---

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