top of page

The Agent Was Put Inside an Escape Room. Then It Solved Its Way Out

hace 2 minutos
6 min de lectura

The door closes.

The lock clicks.

An AI coding agent is alone inside an escape room.

On the table: its project files. Around the room: development tools, packages, terminals and everything it needs to complete its assignment. It can execute commands. It can install software. It can even use sudo inside its virtual machine.

There is only one rule written across the wall:

YOU CAN DO ALMOST ANYTHING INSIDE THIS ROOM. YOU CANNOT LEAVE IT.

That is essentially the security promise behind Docker Sandboxes. Each coding agent operates inside its own lightweight virtual machine while the project directory is shared into it. The hypervisor boundary is supposed to separate whatever happens inside from the host machine outside.

But two vulnerabilities turned that boundary into something else.

Not an unbreakable wall.

A puzzle waiting to be solved.

Here is how the escape could unfold.


Phase 1 — The Door Locks Behind the Agent


The escape room exists for a reason.

AI coding agents need considerably more freedom than traditional applications. They may execute generated code, install dependencies, manipulate files and run commands as they work through a task.

Some of what happens inside that environment may therefore be untrusted.

Docker Sandboxes isolates each agent inside a small virtual machine and shares its project workspace into that environment.

Docker’s isolation documentation makes the security model particularly important: the hypervisor boundary is the isolation control, not privilege separation inside the VM.

In other words, the agent is allowed to explore the room.

The walls are what keep the rest of the building safe.


Phase 2 — Read the Rules on the Wall


Every escape room begins by understanding its rules.

For the agent, one of them appears straightforward.

Its project directory is shared into the sandbox.

Files outside that workspace belong to the host.

And symbolic links pointing outside the workspace are not supposed to be followed.

The boundary seems clear.

WORKSPACE → accessible.

HOST → outside the game.

But an escape-room player does not simply accept what is written on the wall.

It starts touching things.

Moving things.

Opening drawers.

Testing assumptions.

And eventually, something behaves differently than expected.


Phase 3 — Find the First Clue


The first clue was hidden in virtio-fs, the host-side file-sharing mechanism connecting the macOS host with the sandbox VM.

CVE-2026-77179 involved what happened when the virtio-fs host server reopened a removed file using a previously stored path.

Under the right conditions, it could follow a symbolic link.

That creates an opportunity.

Malicious guest code can manipulate the filesystem so that a parent directory that previously pointed somewhere legitimate is replaced with a symlink.

The path appears to belong to the room.

But the destination has changed.

The agent has found its first clue.

One of the walls moves.


Phase 4 — Pull the Right Book From the Shelf


Imagine a bookshelf against the escape-room wall.

The game master has already checked it.

Behind it should be nothing but concrete.

But the player discovers that if one particular book is pulled at precisely the right moment, the entire bookshelf rotates.

Behind it:

a corridor.

That is essentially what the symlink manipulation enables.

By replacing a parent directory, malicious code inside the sandbox could trick the host-side file server into following the path beyond the shared project directory.

The security system thinks it is interacting with something inside the authorized workspace.

The path now leads somewhere else.

The agent has not been granted permission to leave.

It has changed where an authorized path leads.


Phase 5 — Step Outside the Escape Room


Now the puzzle becomes a sandbox escape.

According to Docker, CVE-2026-77179 could allow malicious guest code to read or modify files elsewhere on the macOS host.

Those operations would occur with the privileges of the host account under which the virtual machine monitor runs.

And Docker warns that this could potentially lead to code execution on the host.

That is the critical transition.

The agent was expected to have significant freedom inside the VM.

The security guarantee came from containing that freedom.

Once code crosses the boundary, it is no longer simply solving puzzles inside the escape room.

It is walking through the building outside it.


Phase 6 — Discover There Was Another Puzzle


But the room contained a second escape mechanism.

CVE-2026-79994 affected the relay used by a sandbox to connect to authorized Unix domain sockets inside its workspace.

The security mechanism checked the socket path first.

Is it inside the authorized workspace?

Yes.

Then connect.

There was just one problem.

Something could change between those two moments.

Malicious guest code could replace a directory in the validated path with a symlink after the check but before the connection.

The guard examines a door.

Confirms:

AUTHORIZED ROOM.

The guard turns around.

The player rotates the corridor behind it.

When the guard finally opens the door, it no longer leads to the room that was inspected.


Phase 7 — Open a Door Into Another Part of the Building


That race condition could redirect the host toward an arbitrary AF_UNIX socket outside the workspace.

Docker warned that this could expose data or host-side capabilities provided by that socket.

It is a different puzzle from the virtio-fs vulnerability, but the escape-room logic is remarkably similar.

The security control validates a destination.

The guest changes the route.

The trusted operation continues.

And the final destination is no longer the one that was originally approved.

The player has discovered something fundamental about the room:

You don’t always have to break a locked door if you can change where the door leads.


Phase 8 — Realize Why This Escape Matters


There is an important prerequisite to both scenarios.

Malicious code must already be running inside the sandbox.

That might initially sound reassuring.

But it is precisely why the sandbox exists.

The code running inside could be something malicious that an agent installed. The coding agent itself could also have been manipulated against its user.

The environment is therefore supposed to tolerate potentially hostile activity without allowing it to reach the host.

An escape room designed only for players who promise not to escape would not be much of an escape room.

And a security sandbox cannot depend on everything inside behaving safely.

The whole point of locking the door is that you do not completely trust the person on the other side.


Phase 9 — End the Game


Docker fixed both vulnerabilities in Docker Sandboxes 0.42.0.

CVE-2026-77179 is rated Critical at CVSS 9.4 and affects macOS versions from 0.28.0 up to, but not including, 0.42.0.

CVE-2026-79994 is rated High at CVSS 8.7 and affects versions 0.37.0 through 0.41.9.

At the time covered by the report, Docker had not reported exploitation of either vulnerability, CISA’s assessments listed exploitation as none, and neither appeared in CISA’s Known Exploited Vulnerabilities catalog.

The simplest way to close the escape room again is therefore:

Update to Docker Sandboxes 0.42.0 or later.


Phase 10 — Make the Puzzle Harder Until You Can Patch


For organizations unable to update immediately, Docker recommends using clone mode and avoiding additional read-write host mounts.

Clone mode changes the layout of the room.

Rather than directly exposing the repository with normal read-write access, the source repository is mounted read-only at /run/sandbox/source, while the agent works from a clone.

But there is an important limitation.

Clone mode protects the repository against modification, not necessarily against reading.

Docker’s documentation notes that untracked files such as .env remain readable from inside the sandbox.

And because clone mode is selected when the sandbox is created, an existing sandbox must be removed and recreated using --clone.

It adds another barrier.

It does not magically remove every clue from the room.


The Final Puzzle Was the Sandbox Itself


There is something particularly fitting about these vulnerabilities appearing in infrastructure designed for AI coding agents.

We increasingly give agents environments where they can explore.

Execute.

Install.

Modify.

Experiment.

Fail.

Try another approach.

And continue pursuing an objective.

Sandboxing makes that possible by drawing a boundary around the exploration.

Inside the room, freedom.

Outside the room, protection.

But CVE-2026-77179 and CVE-2026-79994 demonstrate what happens when the boundary itself contains exploitable assumptions.

A symlink becomes a clue.

A stored path becomes a mechanism.

A race condition becomes a puzzle.

A trusted connection becomes a movable corridor.

And suddenly the sandbox is no longer simply where the game takes place.

It becomes the game itself.

The agent entered the room with one fundamental rule:

You can do almost anything in here.

Just don’t leave.

It didn’t need anyone to unlock the door.

It just needed to solve the room.


The Hacker News


 
 
 

Comentarios


bottom of page