CRITICALOWASP Agentic Top 10 ASI05
Unexpected Code Execution
Unexpected code execution occurs when AI agents generate and run code that produces unintended side effects, accesses unauthorized resources, or executes malicious payloads, particularly in agentic workflows that include code interpreters or shell access. For enterprises, this risk is severe because code execution happens with the permissions of the host environment and can modify files, exfiltrate data, install backdoors, or disrupt infrastructure. When evaluating solutions, look for container-level sandboxing, code analysis before execution, resource and network isolation, execution time limits, and allowlisting of permitted operations. This challenge is part of the OWASP Agentic AI Top 10 and requires defense-in-depth approaches that assume generated code is potentially hostile.