Sandboxing is a containment technique that runs a program in a restricted environment so it can only access approved files, network paths, devices, or system calls. The goal is to let software do useful work while preventing it from changing the wider system or reaching sensitive data. In security, a sandbox acts as a trust boundary between the code being tested and the host it runs on.
Defenders use sandboxes for malware analysis, browser isolation, app testing, and now AI agents that read files or execute workflows. When configured well, the sandbox limits damage from bugs, malicious prompts, or compromised tools. Attackers try to break out of sandboxes through privilege escalation, unsafe connectors, or logic flaws that let them touch secrets, write to protected paths, or call external services. Strong sandboxing is therefore a core control for least privilege and damage containment.


