High
Sandbox escape in smolagents Local Python execution environment via dunder attributes
Type: advisorySources: OSV
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-9959
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 04:13 UTC · Revision 1
Source evidence
Sandbox escape in smolagents Local Python execution environment via dunder attributes
core-osv · Original sourcePublished 3 Sept 2025, 16:53 UTC
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.
osv:CVE-2025-9959
Complete source record
{
"id": "4fb749683f4dd8195d5d48fce75d02940e6299692f60b869ca64fb99a2c1fc5b",
"url": "https://osv.dev/vulnerability/CVE-2025-9959",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Sandbox escape in smolagents Local Python execution environment via dunder attributes",
"summary": "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.",
"evidence": "osv:CVE-2025-9959",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2025-9959",
"aliases": [
"CVE-2025-9959"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/huggingface/smolagents",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "420eaebf2b7ebc1461b5b669f8af1bef1b9bd00e"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.21.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
}
],
"versions": [
"v1.0.0",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-9959.json"
}
}
],
"modified": "2026-10-28T02:30:25.668357979Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9959.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-9959",
"https://research.jfrog.com/vulnerabilities/smolagents-local-python-sandbox-escape-jfsa-2025-001434277/",
"https://github.com/huggingface/smolagents/pull/1551",
"https://pypi.org/project/pip"
],
"provider_metadata": {
"cwe_ids": [
"CWE-94"
],
"cna_assigner": "JFROG",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9959.json"
}
},
"related_cves": [
{
"value": "CVE-2025-9959",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 492411,
"published_at": "2025-09-03T16:53:46.304+00:00"
}