Skip to content

Loaded workers share process-global host state across tenants #192

Closed

Description

@lemeb

One use case for celld, as you might know, is "code mode", where agents are empowered to use code execution to chain, parallelize, or otherwise batch tool calls. One library that takes advantage of this is Tardigrade, an agent framework where tool calls are primarily done through code mode, which is JS running in a Worker Loader isolate.

Code mode essentially means arbitrary-ish code execution on a surface that isn't hardened to prevent cross-tenant shenanigans. This presents a particular challenge for celld. While celld explicitly advertises that it is "not safe for hostile multi-tenant use", we think that some cross-isolate issues are worth looking at and potentially patch.

  1. Unauthenticated internal operator listener. Right now, some paths such as /shutdown, /evict/<scope>, /cell/<scope>, /do/<id>, do not authenticate their callers. Therefore, a body method can POST to 127.0.0.1:<internal> and to peer pods. The only way to prevent this is to disallow EgressPolicy, which is too coarse, and won't work on host isolates anyway. We think it would be worth considering either authenticating listeners, or implementing a destination policy for egress.

  2. Every isolate (including loaded workers) have cell-addressing ops in their globals. __do_call, __rpc_call are installed on every isolate's globals. There's a gate (egress_gate_request(Channel::CellRpc)) but not on the caller identity or target cell. This means that a loaded worker can derive another session's id and RPC into it. We think a good, quick solution would be to have these ops consult EgressPolicy similarly to op_fetch or not install them on loaded workers at all.

  3. Two isolates can share the same HTTP stream. If you have two isolates with globalOutbound set to null, the second will mint a stream id that continues the first's sequence, and operations from one can touch the other's.

Activity

  1. added a commit that references this issue on Sep 14, 2026
  2. added 4 commits that reference this issue on Sep 14, 2026
  3. ry commented on Sep 15, 2026

    @ry
    Member

    Fixed in v0.5.0: loaded Workers now isolate their host state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions