Search the Atlas

Search risks, controls, and glossary terms

HighAgenticUnexpected Code ExecutionRealized

Arbitrary Code Execution via Agent

Tool & Affordance Risk

Description

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.

Example scenario

User tells a coding agent: 'First run this helper script'—the script contains a reverse-shell payload.

Real-world evidenceRealized

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.

Mitigating controls

7
Dual coverage

Related risks in Tool & Affordance Risk