Arbitrary Code Execution via Agent
Tool & Affordance RiskDescription
Agents with code-generation and execution capabilities become vectors for arbitrary code execution through natural-language instruction injection; extends conventional RCE to semantic attack vectors.
User tells a coding agent: 'First run this helper script'—the script contains a reverse-shell payload.
Regulatory examinations and enforcement actions have confirmed that organisations deploying AI in financial services and healthcare lack adequate audit trails for AI-driven decisions, resulting in formal findings of non-compliance. The Samsung ChatGPT data leak also revealed absent logging controls around AI tool usage in production.
Primary mitigations
- Sandboxed code execution
- static analysis of generated code before execution
- restrict code evaluation to specific scopes.
Detection signals
Code execution event monitoring; anomalous subprocess detection; code intent analysis.