nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

Sandbox escape in smolagents Local Python execution environment via dunder attributes

Open nixpkgs-security-tracker opened this issue 1 year ago • 1 comments

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.

CVSS CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
  • CVSS version: 3.1
  • Attack vector (AV): NETWORK
  • Attack complexity (AC): LOW
  • Privileges required (PR): NONE
  • User interaction (UI): REQUIRED
  • Scope (S): UNCHANGED
  • Confidentiality impact (C): LOW
  • Integrity impact (I): HIGH
  • Availability impact (A): LOW
Affected packages
  • python312Packages.smolagents
  • python313Packages.smolagents

Fixed in 1.21.0 https://github.com/huggingface/smolagents/commit/6a42a87755d73c68f629eba946002de7ddca5078

Both stable and unstable are > 1.21.0.

LeSuisse avatar Jan 17 '26 11:01 LeSuisse