Skip to content

CVE-2025-9959 Sandbox escape in smolagents Local Python execution environment via dunder attributes

HighCVSS 7.6 EPSS 0.58%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial

Description

Incomplete validation of dunder attributes allows an attacker to escape from the Local Python execution environment sandbox, enforced by smolagents. The attack requires a Prompt Injection in order to trick the agent to create malicious code.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
pypi smolagents(PyPI) < 1.21.0 1.21.0 Fixed

Affected products

ProductAffected versionsFixed in
pypi smolagents(PyPI) < 1.21.0 1.21.0

References