# Sandbox

> Isolated, controlled environment where a program runs with restricted permissions, so that malicious behavior cannot affect the host system.

- **Category**: Technical
- **URL**: https://www.romaindelfosse.fr/en/glossary/sandbox/

---

A **sandbox** is an isolated, controlled execution environment in which a program runs with restricted permissions, preventing any impact on the host system in case of malicious or unexpected behavior. Sandboxing is a pillar of modern cybersecurity: web browsers, mobile apps, cloud containers and AI agents all use sandbox mechanisms to limit the attack surface. Modern malware, for its part, includes techniques to detect and get around sandboxes (sandbox evasion).

## Technical definition

### Isolation mechanisms

Sandboxing relies on several layers of isolation. Process isolation (one program per process, separate memory) is the baseline. Filesystem isolation (chroot, mount namespaces) restricts access to files. Network isolation (network namespaces, firewalling) controls connections. Resource isolation (cgroups) caps CPU, memory and I/O. Hypervisors (VMs) provide the strongest isolation, with a separate kernel.

Docker uses Linux namespaces (PID, network, mount, user) and cgroups to isolate containers. This isolation is lighter than a VM but less strict: the container shares the host's kernel, which makes container escapes (breaking out to the host) possible. Add-on layers such as gVisor (Google) and Kata Containers add VM-style isolation on top of containers.

### Sandboxing AI agents

Personal AI agents (OpenClaw, Claude Code, Devin) pose a specific sandboxing challenge: they need access to the file system, the terminal and the network to be useful, but every access is a potential attack vector. OpenClaw offered a Docker option for isolation, but CVE-2026-24763 showed that a malicious project path could bypass this sandbox and run commands on the host.

## Current challenges

### Sandbox escape and AI agents

Sandbox bypass is a critical risk for autonomous AI agents. The 824 malicious extensions on OpenClaw's ClawHub exploited missing or weak sandboxing to reach the host system's SSH keys, API tokens and passwords. The ClawHavoc infostealer specifically targeted macOS users through seemingly legitimate extensions.

In due diligence, assessing an AI agent's sandbox model has become an essential criterion: what level of isolation is applied by default, what permissions are requested, and how third-party extensions are sandboxed.

### Cloud and containers

91% of runtime security scans fail in containerized environments, according to Sysdig. Good practices include running as non-root, a read-only filesystem, restrictive seccomp profiles, and scanning images for known CVEs. OpenClaw's official Docker image shipped with 2,062 known vulnerabilities, illustrating the risks of insecure images used in production.


## Key Figures

- 91% of runtime security scans fail in containerized environments *(Sysdig — Cloud-Native Security and Usage Report — 2024)*



## Frequently Asked Questions

### What are the different types of sandbox?

Application sandboxes isolate a program from the operating system (macOS App Sandbox, Windows Sandbox, the Android application sandbox). Container sandboxes (Docker, Podman) isolate a process with its own filesystem, network and resource limits using Linux namespaces and cgroups. Browser sandboxes isolate each tab and extension in a separate process (Chrome, Firefox).Network sandboxes (VLANs, micro-segmentation) isolate network segments. Malware analysis sandboxes (Cuckoo, Joe Sandbox, ANY.RUN) run suspicious code in an instrumented environment to observe its behavior without risk to the host system. Each type offers a different level of isolation, from the lightest (container) to the strictest (virtual machine).

### How can a sandbox be bypassed?

Evasion techniques (sandbox escape) exploit vulnerabilities in the isolation mechanism. The Docker bypass through PATH manipulation (OpenClaw's CVE-2026-24763) let a containerized process run commands on the host. Container escape CVEs exploit flaws in runc, containerd or Linux namespaces.Advanced malware detects sandboxes through fingerprinting (hardware checks, timing attacks, absence of user interaction) and changes its behavior to look harmless. These anti-sandbox techniques have become common in modern malware. Sandboxes must be regularly updated and hardened (seccomp, AppArmor, SELinux).

### Why is sandboxing critical for AI agents?

AI agents like OpenClaw run arbitrary code on the user's machine: installing packages, manipulating files, making network requests. Without a sandbox, a compromised agent (or a malicious extension) has access to the entire system: SSH keys, API tokens, personal data. Sandboxing limits the impact of a compromise.OpenClaw offered a Docker option for isolation, but CVE-2026-24763 showed that this sandbox could be bypassed. The challenge for AI agents is to strike a balance between isolation (security) and system access (functionality). Claude Code, for example, uses a system of explicit permissions for every system action.



## Resources

- [Docker Security Documentation](https://docs.docker.com/engine/security/?utm_source=romaindelfosse&amp;utm_medium=glossaire&amp;utm_campaign=sandbox) — Docker

- [Chrome Sandbox Design](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md?utm_source=romaindelfosse&amp;utm_medium=glossaire&amp;utm_campaign=sandbox) — Google

- [gVisor - Container Sandbox](https://gvisor.dev/?utm_source=romaindelfosse&amp;utm_medium=glossaire&amp;utm_campaign=sandbox) — Google

