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

High 7.6 Published Updated
Exploited in the wild
Not known
Fix
None listed

What is CVE-2025-9959?

CVE-2025-9959 is a high-severity vulnerability, published on 3 Sep 2025.

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

Weakness: CWE-94

Which versions are affected by CVE-2025-9959?

How do I fix CVE-2025-9959?

No fix has been published for CVE-2025-9959 yet. Limit exposure of the affected software until one is available.

Is CVE-2025-9959 being exploited?

There is no known exploitation of CVE-2025-9959 in the wild and no public exploit code.

Sources

Also known as GHSA-p8v6-48p4-f4r4.

Is CVE-2025-9959 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free