CVE-2025-9959

Sandbox escape in smolagents Local Python execution environment via dunder attributes

State
Published
Severity
7.6 High
Published
Sep 3, 2025
Updated
Sep 3, 2025
Reserved
Sep 3, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:LJFROG

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
smolagents
  • before 1.21.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.