Arbitrary Code Execution Affecting smolagents package, versions [,1.4.0)


Severity

Recommended
0.0
high
0
10

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

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 Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-SMOLAGENTS-8688410
  • published5 Feb 2025
  • disclosed1 Feb 2025
  • creditUnknown

Introduced: 1 Feb 2025

CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade smolagents to version 1.4.0 or higher.

Overview

smolagents is a 🤗 smolagents: a barebones library for agents. Agents write python code to call tools or orchestrate other agents.

Affected versions of this package are vulnerable to Arbitrary Code Execution in the import_modules() function, which can import arbitrary built-in modules such as _os_system, which can execute code. A malicious LLM containing such imports can execute code when loaded.

CVSS Base Scores

version 4.0
version 3.1