{"id":"CVE-2023-39661","kind":"vulnerability","aliases":["CVE-2023-39661","GHSA-8fp9-43pw-56vw"],"related":[],"title":"PandasAI vulnerable to arbitrary code execution","description":"An issue in pandas-ai v.0.8.1 and before allows a remote attacker to execute arbitrary code via the `_is_jailbreak` function.","summary":"PandasAI, a Python library that lets users ask questions of their data in natural language, has a flaw in its _is_jailbreak check that lets a remote attacker execute arbitrary code. Affected versions are 0.8.1 and earlier.","severity":"critical","cvss":9.8,"epss":0.01417,"exploited":false,"exploited_at":null,"products":[{"name":"pandasai","fixed":[],"affected":"<= 0.8.1","ecosystem":"pypi"},{"name":"gabrieleventuri pandasai","fixed":[],"affected":"<= 0.9.1","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["ai-tooling","cwe-74","cwe-94","data-analysis","llm","pandasai","python"],"not_affected_if":["no-user-prompts","version-above-0.8.1"],"how_to_check":"- Run `pip show pandasai` and confirm whether the installed version is `0.8.1` or earlier.\n- Check requirements files and lockfiles for a pandasai pin at or below `0.8.1`.","fix":null,"status":"open","published_at":"2023-08-15T17:15:13+00:00","first_seen_at":"2026-11-16T15:53:11+00:00","triaged_at":"2026-11-16T15:54:22+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"ai-tooling","confidence":0.6,"triage":{"at":"2026-11-16T15:54:22Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"internet","title":"PandasAI: jailbreak check lets a remote attacker run arbitrary code","impact":"high","summary":"PandasAI, a Python library that lets users ask questions of their data in natural language, has a flaw in its _is_jailbreak check that lets a remote attacker execute arbitrary code. Affected versions are 0.8.1 and earlier.","audience":"developers","category":"ai-tooling","nicknames":[],"who_cares":["pandasai","python","llm","data-analysis"],"confidence":0.6,"fix_status":"unknown","needs_auth":"unknown","worst_case":"attacker runs arbitrary code on the server hosting PandasAI","analyst_note":"Confirm the fixed version and whether authentication or a non-default setting is required, via https://github.com/advisories/GHSA-8fp9-43pw-56vw.","how_to_check":"- Run `pip show pandasai` and confirm whether the installed version is `0.8.1` or earlier.\n- Check requirements files and lockfiles for a pandasai pin at or below `0.8.1`.","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["no-user-prompts","version-above-0.8.1"],"who_is_affected":"Applications that import pandasai and pass user-supplied prompts into it are the ones exposed, since the flaw sits in the prompt jailbreak check that handles that input. Services that only run pandasai on fixed internal data with no user-written prompts are less exposed. The sources do not state a fixed version.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000748,"input_tokens":4545,"output_tokens":587,"severity_before":"critical"},"analyst_status":"queued","analyst_note":"Confirm the fixed version and whether authentication or a non-default setting is required, via https://github.com/advisories/GHSA-8fp9-43pw-56vw.","search":"'-2023':8A,16A '-39661':9A,17A '-74':25B '-94':27B '0.8.1':68B '43pw':13A '56vw':14A '8fp9':12A 'affect':65B 'ai':22B,76C 'ai-tool':21B 'allow':80C 'analysi':30B 'arbitrari':4A,63B,86C 'ask':41B 'attack':61B,83C 'check':56B 'code':5A,64B,87C 'cve':7A,15A 'cwe':24B,26B 'data':29B,45B 'data-analysi':28B 'earlier':70B 'execut':6A,62B,85C 'flaw':51B 'function':92C 'gabrieleventuri':19A 'ghsa':11A 'ghsa-8fp9-43pw-56vw':10A 'issu':72C 'jailbreak':55B,91C 'languag':48B 'let':39B,58B 'librari':37B 'llm':31B 'natur':47B 'panda':75C 'pandas-ai':74C 'pandasai':1A,18A,20A,32B,34B 'python':33B,36B 'question':42B 'remot':60B,82C 'tool':23B 'user':40B 'v.0.8.1':77C 'version':66B 'via':88C 'vulner':2A","nicknames":[],"mitigations":[],"who_affected":"Applications that import pandasai and pass user-supplied prompts into it are the ones exposed, since the flaw sits in the prompt jailbreak check that handles that input. Services that only run pandasai on fixed internal data with no user-written prompts are less exposed. The sources do not state a fixed version.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"developers","plain_action":null,"pkeys":["gabrieleventuripandasai","pandasai"],"ptokens":["gabrieleventuri","pandasai"],"labels":["aitooling","critical","cwe74","cwe94","dataanalysis","llm","pandasai","pypi","python","vendor"],"campaign_type":null,"search_a":"'-2023':8A,16A '-39661':9A,17A '43pw':13A '56vw':14A '8fp9':12A 'arbitrari':4A 'code':5A 'cve':7A,15A 'execut':6A 'gabrieleventuri':19A 'ghsa':11A 'ghsa-8fp9-43pw-56vw':10A 'pandasai':1A,18A,20A 'vulner':2A","search_b":"'-74':25B '-94':27B '0.8.1':68B 'affect':65B 'ai':22B 'ai-tool':21B 'analysi':30B 'arbitrari':63B 'ask':41B 'attack':61B 'check':56B 'code':64B 'cwe':24B,26B 'data':29B,45B 'data-analysi':28B 'earlier':70B 'execut':62B 'flaw':51B 'jailbreak':55B 'languag':48B 'let':39B,58B 'librari':37B 'llm':31B 'natur':47B 'pandasai':32B,34B 'python':33B,36B 'question':42B 'remot':60B 'tool':23B 'user':40B 'version':66B","search_c":"'ai':76C 'allow':80C 'arbitrari':86C 'attack':83C 'code':87C 'execut':85C 'function':92C 'issu':72C 'jailbreak':91C 'panda':75C 'pandas-ai':74C 'remot':82C 'v.0.8.1':77C 'via':88C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2023-08-15T17:15:13+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":1,"sources":[{"source":"ghsa","external_id":"GHSA-8fp9-43pw-56vw","url":"https://github.com/advisories/GHSA-8fp9-43pw-56vw","severity":"critical","published_at":"2023-08-15T18:31:32+00:00","modified_at":"2026-11-16T15:52:52+00:00","first_seen_at":"2026-11-16T15:53:11+00:00","fetched_at":"2026-11-16T15:56:53+00:00","note":null},{"source":"nvd","external_id":"CVE-2023-39661","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39661","severity":null,"published_at":"2023-08-15T17:15:13+00:00","modified_at":"2026-06-17T06:12:41+00:00","first_seen_at":"2026-11-16T16:08:50+00:00","fetched_at":"2026-11-16T16:08:50+00:00","note":null}],"documents":[{"id":171090,"url":"https://github.com/gventuri/pandas-ai/issues/410","title":"Exploit: github.com","kind":"poc","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"poc","confidence":null,"note":"Exploit: github.com"}],"disclosures":[],"exploit_sources":[{"type":"poc","url":"https://github.com/gventuri/pandas-ai/issues/410"},{"type":"epss","score":0.01417,"url":"https://api.first.org/data/v1/epss?cve=CVE-2023-39661"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}