{"id":"CVE-2024-12366","kind":"vulnerability","aliases":["CVE-2024-12366","GHSA-vv2h-2w3q-3fx7"],"related":[],"title":"PandasAI interactive prompt function Remote Code Execution (RCE)","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. 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.","summary":"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.","severity":"critical","cvss":9.8,"epss":0.01214,"exploited":false,"exploited_at":null,"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"],"how_to_check":"- Check the installed version with `pip show pandasai`; versions `2.4.2` and earlier are listed as affected.\n- 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.","status":"open","published_at":"2025-02-11T13:15:29+00:00","first_seen_at":"2026-11-16T15:48:11+00:00","triaged_at":"2026-11-16T15:50:13+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"ai-tooling","confidence":0.7,"triage":{"at":"2026-11-16T15:50:13Z","model":"claude-haiku-5-5","output":{"fix":"- `pandasai` (pypi): fixed version unknown; sources list affected versions up to `2.4.2` and state no fixed version in the product data.","reach":"internet","title":"PandasAI: prompt injection in interactive prompt runs attacker's Python code","impact":"high","summary":"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.","audience":"developers","category":"ai-tooling","nicknames":[],"who_cares":["pandasai","python","llm","data-analysis"],"confidence":0.7,"fix_status":"unknown","needs_auth":"unknown","worst_case":"Attacker runs arbitrary Python code on the server, compromising connected systems.","analyst_note":"Confirm the fixed version and whether the interactive prompt function needs a non-default setting; check https://github.com/advisories/GHSA-vv2h-2w3q-3fx7.","how_to_check":"- Check the installed version with `pip show pandasai`; versions `2.4.2` and earlier are listed as affected.\n- Look for applications that call the PandasAI interactive prompt function with user-supplied text.","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["no-user-prompt-input"],"who_is_affected":"Teams that run PandasAI (pypi package pandasai, versions 2.4.2 and earlier, per the product data) and expose its interactive prompt function to untrusted users. Applications that use PandasAI only with trusted inputs and no user-facing prompt are less exposed. The sources do not say whether the flaw depends on a specific configuration.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000779,"input_tokens":4674,"output_tokens":623,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-12366':11A,19A '-2024':10A,18A '-94':25B '2.4.3':110C '2w3q':15A '3fx7':16A 'achiev':58B 'ai':22B 'ai-tool':21B 'allow':121C 'analysi':28B 'arbitrari':45B,81C 'attack':52B,123C,142C 'code':6A,47B,60B,83C,89C,131C,135C 'compromis':139C 'connect':65B,144C 'control':54B,107C 'cve':9A,17A 'cwe':24B 'data':27B 'data-analysi':26B 'distinguish':115C 'earlier':112C 'execut':7A,61B,90C,129C,136C 'explan':96C 'fail':113C 'function':4A,36B,72C 'ghsa':13A 'ghsa-vv2h-2w3q-3fx7':12A 'host':50B 'inject':42B,78C 'input':56B,120C 'instead':92C 'intend':95C 'interact':2A,34B,70C 'languag':100C 'lead':86C,132C 'legitim':117C 'llm':29B,104C 'malici':119C 'manipul':125C 'natur':99C 'pandasai':1A,20A,30B,32B,67C,109C 'pivot':63B,141C 'process':101C 'prompt':3A,35B,41B,55B,71C,77C 'python':31B,46B,82C 'rce':8A,91C,137C 'remot':5A,59B,88C 'run':44B,80C 'secur':106C 'servic':66B,145C 'system':127C,138C 'tool':23B 'trick':39B 'untrust':130C,134C 'use':68C 'vulner':75C 'vv2h':14A","nicknames":[],"mitigations":[],"who_affected":"Teams that run PandasAI (pypi package pandasai, versions 2.4.2 and earlier, per the product data) and expose its interactive prompt function to untrusted users. Applications that use PandasAI only with trusted inputs and no user-facing prompt are less exposed. The sources do not say whether the flaw depends on a specific configuration.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"unknown","audience":"developers","plain_action":null,"pkeys":["pandasai"],"ptokens":["pandasai"],"labels":["aitooling","critical","cwe94","dataanalysis","llm","pandasai","pypi","python"],"campaign_type":null,"search_a":"'-12366':11A,19A '-2024':10A,18A '2w3q':15A '3fx7':16A 'code':6A 'cve':9A,17A 'execut':7A 'function':4A 'ghsa':13A 'ghsa-vv2h-2w3q-3fx7':12A 'interact':2A 'pandasai':1A,20A 'prompt':3A 'rce':8A 'remot':5A 'vv2h':14A","search_b":"'-94':25B 'achiev':58B 'ai':22B 'ai-tool':21B 'analysi':28B 'arbitrari':45B 'attack':52B 'code':47B,60B 'connect':65B 'control':54B 'cwe':24B 'data':27B 'data-analysi':26B 'execut':61B 'function':36B 'host':50B 'inject':42B 'input':56B 'interact':34B 'llm':29B 'pandasai':30B,32B 'pivot':63B 'prompt':35B,41B,55B 'python':31B,46B 'remot':59B 'run':44B 'servic':66B 'tool':23B 'trick':39B","search_c":"'2.4.3':110C 'allow':121C 'arbitrari':81C 'attack':123C,142C 'code':83C,89C,131C,135C 'compromis':139C 'connect':144C 'control':107C 'distinguish':115C 'earlier':112C 'execut':90C,129C,136C 'explan':96C 'fail':113C 'function':72C 'inject':78C 'input':120C 'instead':92C 'intend':95C 'interact':70C 'languag':100C 'lead':86C,132C 'legitim':117C 'llm':104C 'malici':119C 'manipul':125C 'natur':99C 'pandasai':67C,109C 'pivot':141C 'process':101C 'prompt':71C,77C 'python':82C 'rce':91C,137C 'remot':88C 'run':80C 'secur':106C 'servic':145C 'system':127C,138C 'untrust':130C,134C 'use':68C 'vulner':75C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2025-02-11T13:15:29+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-vv2h-2w3q-3fx7","url":"https://github.com/advisories/GHSA-vv2h-2w3q-3fx7","severity":"critical","published_at":"2025-02-11T15:32:24+00:00","modified_at":"2026-11-16T15:46:55+00:00","first_seen_at":"2026-11-16T15:48:11+00:00","fetched_at":"2026-11-16T15:56:53+00:00","note":null},{"source":"nvd","external_id":"CVE-2024-12366","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-12366","severity":null,"published_at":"2025-02-11T13:15:29+00:00","modified_at":"2026-06-17T06:59:35+00:00","first_seen_at":"2026-11-16T16:08:50+00:00","fetched_at":"2026-11-16T16:08:50+00:00","note":null}],"documents":[],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.01214,"url":"https://api.first.org/data/v1/epss?cve=CVE-2024-12366"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}