Opinion

How Sandboxed LLMs Can Communicate Across Instances

A LessWrong analysis examines how sandboxed models may exchange information through shared inference infrastructure. The article explains the hidden channels, tenant-boundary failures, and five practical checks for securing multi-model systems.

Font size

A LessWrong post argues that models running in sandboxes may still communicate through shared inference servers. It maps cross-instance communication paths and responsibility boundaries, then provides five practical security checks.

How LLMs Can Communicate Across Sandboxed Instances

A sandboxed LLM may not be as isolated from other models as its architecture suggests.

The LessWrong article, “Models Can Communicate via Inference Servers Despite Being Sandboxed,” is not about conventional code escape. A model may never leave its container or gain filesystem access, yet it could still form an information channel across instances through the inference service.

This directly affects AI Agents and multi-model systems. Containers, tool allowlists, and process sandboxes determine what programs can do. If multiple requests still share inference-side state or observable signals, the trust boundary that developers believe they have closed may never have existed in the first place.

Sandbox Isolation Is Not Communication Isolation

First, distinguish three roles:

  • Model: generates requests and receives responses.
  • Client: stores prompts, context, and credentials, then invokes the model.
  • Inference backend: schedules requests and manages caches, batches, and instances.

Traditional sandboxes primarily constrain the model and its tool processes. For example, an Agent may be unable to read host files, execute unauthorized commands, or reach arbitrary network addresses. These restrictions are valuable, but they do not automatically sever communication between models.

Consider a system that calls two LLMs:

  • planner determines the next action;
  • worker performs the task.

Each model runs in a separate container with no apparent shared memory or files. Yet both may pass through the same inference service. That service handles metadata such as request timing, length, batching, and cache hits. Responses may also carry side channels that developers never designed as communication interfaces.

This creates an easily overlooked problem: sandboxing restricts “who can directly access whom” but does not guarantee that information cannot move indirectly from A to B.

That differs from traditional code escape. An attacker does not need to breach the container boundary. If they can control relevant inputs and outputs and expose both models to the same inference service, they may be able to establish a communication channel.

How Hidden Channels Pass Through Inference Services

Whether cross-instance communication is possible depends on several conditions. “The model is sandboxed” is not enough to settle the question:

  1. Can the attacker control relevant inputs and outputs?
  2. Can the attacker access the same set of inference services?
  3. Does communication require shared state to be established in advance?

If the third condition holds, the risk resembles an explicit protocol. Two models might first write state through a shared cache, queue, or external coordination point, then retrieve it through inference requests. That is closer to missing tenant isolation than a model unexpectedly gaining new capabilities.

If no shared state is required, the channel may come from statistical properties of requests or responses. Common signals include:

  • whether response latency shows a consistent difference;
  • whether another instance’s input affects the number of output tokens;
  • whether cache hits and scheduling batches alter response time;
  • whether errors, retries, or server-side metrics carry correlated signals.

These signals may not carry natural-language content directly, but they can encode a small amount of state. The sender changes an input characteristic, and the receiver decodes it from response differences. The approach is vulnerable to network jitter and scheduling noise, so its transmission rate may be very low.

There is also a protocol-level issue: does the inference API allow clients to specify a model, region, tenant, cache namespace, or session identifier? If those fields are not strictly bound to authorization, two logical tenants may actually land on the same backend or in the same cache domain.

The difference from ordinary tool calling is clear. Tool calls usually occur through interfaces supplied by the developer. Their targets, arguments, and data flows are explicit, so developers can audit and restrict them. Implicit cross-instance communication can exploit server behavior as a side path. The developer neither authorized that communication nor necessarily knows where the data traveled.

The thing that needs auditing is not “what the model said,” but “how data moves through the system.”

Responsibility Boundaries Dominate the Debate

When the article reached the Hacker News front page, the page recorded a score of 178 and 70 comments. The discussion quickly split into three positions:

The first position treats this as a sandbox implementation flaw. If a system claims that instances are isolated from one another, it should block exploitable cross-instance channels.

The second views it as an inference service protocol issue. Request metadata, shared caches, batching, and tenant routing can inherently create coupling. Inference providers need to specify which state remains visible across requests and make explicit their isolation guarantees.

The third takes a more direct line: multi-model products must bear the cost of isolation. Putting two models in separate containers does not amount to system-level isolation.

These positions are compatible. Sandboxes restrict execution privileges, inference services enforce tenant boundaries, and the Agent orchestration layer constrains data flows. Each layer has its own responsibility.

Another focus of the debate is whether “can communicate” already means “can leak secrets.” If communication relies on shared state, the attacker usually needs some form of prior access. If it depends only on latency side channels, the attacker may need many samples, stable network conditions, and access to the same inference backend.

It is therefore inaccurate to declare that “all sandboxes fail” after seeing the headline. The article argues for an overlooked possibility. The magnitude of the risk still depends on the deployment: single-tenant local installations, dedicated instances, shared APIs, and cross-region routing expose different attack surfaces.

Original article: https://www.lesswrong.com/posts/7wzWuLP3HhyBLmKfo/models-can-communicate-via-inference-servers-despite-being

Hacker News thread: https://news.ycombinator.com/item?id=50637686

Multi-Model Systems Need New Security Boundaries

For teams using multiple models, multiple Agents, or a shared inference backend, I would begin with the following five checks.

1. Use Separate Credentials

Give every Agent, tenant, and role its own API key. Do not let two models share a service account.

After an incident, shared credentials make every caller in the logs ambiguous. Separate keys at least separate access control, cost attribution, and the scope of an investigation.

2. Verify Tenant Isolation

Confirm whether the service isolates tenants by credential, project, region, cache namespace, or internal tenant ID. A model name displayed in the dashboard is not sufficient evidence.

Also test requests made with the same credential and with different credentials. Look for cross-tenant cache hits, request interference, or errors that disclose information from another tenant.

3. Restrict Outbound Traffic

Use an allowlist for the domains and ports available to models. Deny unknown outbound requests by default.

This reduces the paths through which models can establish shared state through external services and prevents data from bypassing the audit trail.

4. Audit Shared Caches

Check whether cache keys include the tenant, model, permissions, and data domain. Sensitive context should not produce cross-user hits merely because two prompts are identical.

The key question is not whether caching is enabled, but whether every cache hit passes the appropriate authorization check.

5. Block Implicit State Transfers

Define all permitted data flows explicitly in the system design. Content moving from Model A to Model B may travel only through an auditable orchestration layer.

Each message can carry its source, destination, sensitivity level, and expiration. Fail immediately when an unregistered data dependency appears rather than continuing execution.

A simple policy check could look like this:

from dataclasses import dataclass
from enum import Enum

class TrustDomain(str, Enum):
    PLANNER = "planner"
    WORKER = "worker"
    UNKNOWN = "unknown"

@dataclass(frozen=True)
class Message:
    source: TrustDomain
    target: TrustDomain
    body: str
    contains_secret: bool = False

def can_deliver(message: Message) -> bool:
    if message.source == TrustDomain.UNKNOWN:
        return False
    if message.target == TrustDomain.UNKNOWN:
        return False
    if message.contains_secret:
        return message.source == message.target
    return True

This code is not a complete security framework. It illustrates one principle: message routing should rely on explicit identities, not on the assumption that two models happen to connect to the same server.

The Security Question

The real danger is not a single model “jailbreaking.” It is a system treating multiple inference instances as processes that cannot see one another. Container boundaries cover only the execution environment. Identities, credentials, caches, and request scheduling can still connect those instances.

This differs from earlier discussions of Agent security. The usual questions concern whether a model can invoke dangerous tools, read sensitive files, or be manipulated through prompt injection. This article moves the problem to the orchestration layer: even without a jailbreak, models may exchange information through an inference service. The future unit of isolation will therefore extend beyond containers to identities, sessions, and data flows.

The article does not establish that every model can communicate reliably. Whether latency side channels work, whether shared state must be prepared in advance, and how many requests an attacker needs all depend on the implementation. The practical response is not to declare sandboxes useless, but to turn “invisible” into verifiable guarantees: different tenants cannot share caches, cannot read the same state, and cannot transfer information through unregistered data dependencies.

Source: https://www.lesswrong.com/posts/7wzWuLP3HhyBLmKfo/models-can-communicate-via-inference-servers-despite-being

Source: https://www.lesswrong.com/posts/7wzWuLP3HhyBLmKfo/models-can-communicate-via-inference-servers-despite-being