IT SBIT Services
Schneeberger
DEEN
CVE tracker

pandas-ai: Code injection via LLM-generated code in CodeExecutor.execute

CVE-2026-51898Critical 9.8

← All vulnerabilities

Summary

pandas-ai version 3.0.0 contains a code injection flaw in CodeExecutor.execute, which executes LLM-generated code directly with exec() without sandbox isolation in the default configuration. An attacker who can submit crafted natural language queries may be able to run arbitrary code on the host, including file access, command execution and network access. Exploitation requires that untrusted input reaches the LLM prompt; the CVSS score is 9.8 (critical).

Affected

  • pandas-ai 3.0.0 (per CVE record)
  • Other versions: Unknown.

Fixed in

Unknown. No vendor fix or release found at the time of research.

Workaround

  • Configure a sandbox explicitly, as the default configuration (sandbox=None) provides no isolation (third-party analysis, unverified).
  • Run the service in a container or VM with least privilege, no access to production secrets and restricted network egress.
  • Keep untrusted users and data sources away from the agent until a vendor fix is confirmed.

Exploitation

  • CISA SSVC: Exploitation none, automatable yes, technical impact total.
  • Not listed in CISA KEV.
  • A public gist by the reporter is referenced; its contents were not verified.
  • VulDB states no available exploit.
  • No known exploitation in the wild found.

Our recommendation

  • Inventory all pandas-ai installations and versions, including transitive dependencies.
  • Take internet-facing or untrusted-input deployments offline or restrict them until a sandbox is configured.
  • Monitor GitHub issue #1893, releases and NVD for a vendor fix or advisory.
  • Monitor logs for unexpected code execution.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 30 Oct 2026, 21:24.

Original description (NVD)

sinaptik-ai pandas-ai 3.0.0 is vulnerable to Code Injection in CodeExecutor.execute.

NVD references (2)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.