Unsafe deserialization of untrusted data
What it finds
Data is loaded with a deserializer that can execute code (pickle, marshal, unsafe YAML, torch.load without weights_only, node-serialize).
Why it matters
Loading a crafted file or message with these functions runs the attacker's code inside the agent process — with all its credentials and tool access.
What an attacker could do: A malicious model file, cache entry, or message could give an attacker full code execution on the agent host.
How to fix it
Use data-only formats (JSON, yaml.safe_load, safetensors, torch.load(..., weights_only=True)) and never deserialize content from users, models, or the network with pickle-style loaders.
Pro shows the corrected code for your exact file, step by step, and re-scans to confirm the fix. See plans
Check details
- Finding code
- UNSAFE_DESERIALIZATION
- How it detects
- Looks for a specific risky pattern in the code or config.
- Confidence
- Definite: the risky setting is written plainly in the file.
- Scans
- Any text-based agent source or configuration (JS/TS/Python/JSON/YAML)
- OWASP LLM Top 10
- LLM05 - Supply Chain Vulnerabilities, LLM03 - Training Data Poisoning
- NIST AI RMF
- MG-2.2, MS-2.3
- SOC 2
- CC7.1, CC8.1
Check your agent for this
Paste your agent code or MCP config. The free scan runs all 124 checks in about 10 seconds — no account needed.
Related checks
- Command injection riskAV-RUNTIME-004 · Critical
- Unsafe dynamic code executionAV-RUNTIME-005 · Critical
- Privileged or host-mounted container configurationAV-RUNTIME-007 · Critical
- SQL query built from unescaped inputAV-RUNTIME-009 · Critical
- Prompt injection surface detectedAV-RUNTIME-002 · High
- Unsandboxed browser automationAV-RUNTIME-008 · High