Arbitrary Code Injection Affecting pandasai package, versions [,2.4.2)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Not Defined
EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-PANDASAI-8715593
  • published12 Feb 2025
  • disclosed11 Feb 2025
  • creditJoe Lucas, Becca Lynch, Rich Harang, Kai Greshake, John Irwin

Introduced: 11 Feb 2025

NewCVE-2024-12366  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade pandasai to version 2.4.2 or higher.

Overview

pandasai is a Pandas AI is a Python library that integrates generative artificial intelligence capabilities into Pandas, making dataframes conversational.

Affected versions of this package are vulnerable to Arbitrary Code Injection through the interactive prompt function. An attacker with access to the chat prompt can bypass PandasAI's restrictions to execute arbitrary code by injecting malicious inputs into the prompt, which are incorrectly processed as legitimate commands.

CVSS Scores

version 4.0
version 3.1