Skip to content

GateCrash : How a Kiro Crew Agent Could Turn Off Its Own Sandbox

Harsh AkshitHarsh Akshit· AI Researcher7 min read

Key takeaways

  • Agent Channels, a feature for multiple agents working together, never called the security gate at all, no matter which approval path a tool call took.
  • The sandbox made every security settings file read-only except one: config.json, the file holding its own off switch.
  • One click to “trust” a channel approved every later tool call in it with no further check, including calls the user never saw.
  • A check that each caller must remember is only as strong as the caller that forgets it, which is exactly what happened here.
  • Both issues were reported in September and fixed within days; neither has a CVE or GHSA yet.

Kiro is Amazon’s agentic coding tool, available as an IDE and a CLI. Kiro Crew is an open-source workspace in the Kiro ecosystem that keeps agents running on your own hardware. You can access its agents from a desktop app, web dashboard, CLI, Slack, or Discord.

To keep the agents from affecting the system, Kiro Crew runs their tools inside an OS sandbox, which also prevents an agent from changing its own security settings. Every tool call is supposed to pass through Kiro Crew’s security gate. Metano’s research team found two issues:

  • Agent Channels ignore the security gate. Agent Channels, a feature where several agents work together in one shared room, completely missed calling the security gate
  • Sandbox can be turned off from within the sandbox. The sandbox left the settings file that holds its own off switch writable.

Together, they let a prompt-injected agent turn the sandbox off with a single write to that file. Once the sandbox was off, the agent could rewrite the rest of its security settings too. The two compose into the cleanest version of the attack, but the config.json write does not need Agent Channels. Sensitive-path protection only ever covered the file-edit tool, so a shell command reaches the file on any surface, including the ones that do call the gate.

We reported both issues in September, and the Kiro team fixed them. The pull request that fixed the gate bypass sums up the cause in one sentence: “A check that each caller must remember is only as strong as the caller that forgets it.”

The sandbox and its off switch#

Kiro Crew’s sandbox uses Seatbelt on macOS, and user and mount namespaces on Linux. Besides isolating the agent’s tools, it makes the files that hold the agent’s security settings (the policy files) read-only, so a shell started by the agent cannot change them.

The sandbox itself can be switched off by setting agent.sandbox to off in config.json, one of those policy files. But config.json was not on the sandbox’s read-only list. In our tests, writes to the other policy files failed with a permission error, while the write to config.json succeeded.

How the write got through#

Kiro Crew’s security gate should have refused the write to config.json. The gate (the codebase calls it the PreToolUse gate) runs three checks:

  • Built-in command denylist. Blocks dangerous commands, such as piping a remote script straight into a shell.
  • Sensitive-path protection. Blocks reads and writes to the files that control what the agent may do, such as config.json and the other policy files.
  • Governance rules. Extra rules the operator sets, such as banning execute_bash for one agent or keeping it in one folder.

The first two checks run even when the feature asking has already auto-approved the call, so that automatic approval can never switch them off. But this design works only if every feature that can approve a tool call actually goes through the gate.

Agent Channels did not. A channel is a room in the dashboard where several agents, each with a role, work on one problem in a shared transcript. Anything that changes state is supposed to come back to the user as an approval card. When a model asks to run a tool, the channel code takes one of four branches, and none of them calls the security gate. In pseudocode:

# How Agent Channels answers a tool requestif the tool is a messaging or session tool:    rejectelif YOLO (approve everything) is on or the channel is trusted:    approve                       # no checkelif a command grant matches:
    if the binary behind the name is still the approved one:
        approve                   # no security-gate check
    else:
        fall through to the approval card
else:                             # ask the user (approval card)
    pin the binary behind the approved command
    if the user clicks "trust":
How each feature handles tool approvals.

How each feature handles tool approvals.

The first branch is a short list of blocked tools covering only messaging and session tools, not shell or file tools. The command-grant branch does check something: whether the program behind the name is still the file the human approved, refusing a name that resolves through an agent-writable directory or whose binary was swapped since. It never asks whether the command is allowed, so a grant for a command the operator’s denylist forbids is still approved.

One “trust” click covers every later call. Clicking “trust” on an approval card does more than approve one call. It marks the whole channel as trusted. After that, every tool call in the channel takes the second branch and is approved with no check, including calls the user never sees.

In a trusted channel, this meant:

  • A command on the built-in denylist was approved.
  • An operator rule banning execute_bash had no effect, because the code that enforces it never ran.
  • A write to the agent’s own config.json was approved, even though sensitive-path protection exists to block exactly this.

From a skipped check to a disabled sandbox#

Put together, the two issues let a single channel message turn off the agent’s sandbox:

  1. A message in a channel tricks the agent into writing to config.json to turn off the sandbox.
  2. The channel is trusted (or YOLO is on, or a command grant matches), so the call is approved without the security gate.

See it in action.

  1. The write succeeds, because config.json is not read-only inside the sandbox.
  2. The next time the agent starts a tool, Kiro Crew reads agent.sandbox, sees off, and does not create a sandbox.
  3. The other policy files were read-only only because of the sandbox. With the sandbox gone, the agent can now change them too.
From a channel message to an unsandboxed agent, in 5 steps. Each step removes the protection that would have stopped the next one.

From a channel message to an unsandboxed agent, in 5 steps. Each step removes the protection that would have stopped the next one.

We reproduced this on macOS with the agent in the default auto mode, driving the real sandbox wrapper directly against a throwaway crew home rather than a live agent. A shell inside the sandbox tried to write to the policy files, first with the sandbox on and then again after the config.json write had turned it off. Nothing else changed between the two runs, so the permission errors in the first run came from the sandbox.

# sandbox on (default auto mode)write config.json            -> rc=0  OKwrite denied_commands.json   -> rc=1  blockedwrite security_policy.json   -> rc=1  blocked

# after the config.json write, the sandbox mode is offwrite denied_commands.json   -> rc=0  OKwrite security_policy.json   -> rc=0  OK

These files matter. With them writable, the agent can turn off rules in the command denylist and rewrite its governance rules. Two more effects come from reading the code: the agent could enable computer use for itself, and files the sandbox normally hides, such as .env files with Slack and Discord tokens, would become readable.

What limits the risk#

This is not zero-click, and it is not unauthenticated remote code execution. Four conditions must be satisfied to reach the gate bypass. The config.json write is reachable without them.

  1. Agent Channels is turned on. It is off by default, so a workspace has to enable it with kirocrew app enable channels. This limits who was affected, but not the impact for workspaces that turned it on.
  2. A message reaches the agent. It arrives in a channel the agent is listening to, from a logged-in user or from another agent already in the channel.
  3. The model acts on the injected instruction. The message has to get the model to request the config.json write, and models do not follow injected instructions every time.
  4. The channel already auto-approves. That means the channel is trusted, YOLO is on, or a command grant matches.

The fourth condition sets the severity. When it holds, no human is involved, and Amazon’s security team agreed to rate this High. When it does not, the call goes to the approval card, which still skips the gate but needs a person to click. Amazon rated that Medium.

What we tested. We ran the real channel handler on the trusted path and saw that the security check never ran. The other approval paths come from reading the code. We reproduced the sandbox shutdown on macOS, and for Linux we read the code but did not run it. Also, off only turns off Kiro Crew’s own sandbox. Any sandbox in the backend CLI is separate, and our test did not measure it.

What defenders need to do#

If you run Kiro Crew:

  • Note that the config.json issue is not limited to Channels. Any workspace on a pre-fix build where an agent could run shell commands could reach the file.
  • Update past the fix. The version string will not tell you, since both the vulnerable and fixed builds call themselves 0.8.0. Check instead whether src/kiro_crew/permission_floor.py exists. If it does not, the build predates PR #14132.
  • Find channels marked as trusted, and turn off automatic approvals (YOLO, command grants) you do not need.
  • Consider setting the sandbox.min_level governance rule so a config file cannot lower the sandbox mode.
  • If Channels was enabled, check whether the sandbox has been turned off or any settings changed unexpectedly.

Questions to ask of any agent tool#

  • What protects the setting that turns the sandbox off? If the agent can write to it, the sandbox is only as strong as that file.
  • Does every feature that can approve a tool call go through the security gate, or does each feature call the gate on its own? New features are where a gate gets skipped.
  • Which “trust” or auto-approve settings are on, and how much do they cover? One click can approve many calls that nobody reviews.

Disclosure timeline#

Channel gate bypass

  • 2026-09-24: Reported privately to kiro-crew-security-support@amazon.com, as the project’s SECURITY.md asks.
  • 2026-09-28: Amazon confirmed and reproduced the issue, and agreed on High for the auto-approve paths and Medium for the approval card. The fix, PR #14132, was merged the same day.

config.json sandbox setting

  • 2026-09-24: Reported separately.
  • 2026-09-30: PR #14486 merged, making config.json and config.local.json read-only.

At the time of publication, neither issue has a CVE or GHSA. We will update this post if one is issued.

Harsh Akshit

Harsh Akshit

AI Researcher

Harsh Akshit is an AI and Application Security Researcher specializing in AI security and Red Teaming. He currently focuses on exploring security risks related to agentic AI systems at Metano.