Skip to main content
Agent deserializes untrusted data (pickle, YAML load, JSON with class hooks) enabling code execution

How to resolve

Replace pickle.loads() with json.loads(). Use yaml.safe_load() instead of yaml.load(). Never deserialize data from untrusted sources.

Risk

Governance/Compliance This vulnerability falls under ASI05:2026 — Unexpected Code Execution in the OWASP Top 10 for Agentic Applications. Agent generates or runs code, commands, or scripts without safe sandboxing or review. Security Agent deserializes untrusted data (pickle, YAML load, JSON with class hooks) enabling code execution. If exploited, this can compromise the agent’s integrity, confidentiality, or availability, potentially affecting downstream systems and data.

Explanation

Agent deserializes untrusted data (pickle, YAML load, JSON with class hooks) enabling code execution. This falls under ASI05 (Unexpected Code Execution): Agent generates or runs code, commands, or scripts without safe sandboxing or review.

Specifications

Trigger
  • Agent scan detects agent deserializes untrusted data (pickle, YAML load, JSON with class hooks) enabling code execution
The scanner looks for patterns such as:
  • pickle.loads() on external data
  • yaml.load() without SafeLoader
  • json deserialization with object_hook
Severity
  • HIGH
Applies to: Agent