WeaknessASC-2026-0005Major weakness
Unexpected code execution by agents
CriticalMitigated
Agent-generated code or commands run on hosts with real credentials, network access or data.
How to detect it
- A tool exposes shell or code execution
- Tool calls contain download-and-run commands, reverse shells or encoded PowerShell
How to resolve it
- Run generated code in ephemeral sandboxes with no host network by default
- Keep credentials out of sandbox environments
- Cap CPU, memory and runtime
How to investigate
- Collect every command and code block the agent executed
- Check the host for new processes, scheduled tasks, users and outbound connections
- Rebuild affected hosts from a known-good image and rotate their secrets