Research/loom-ci-name-adopt
0-dayNo CVEHighPublic

Loom harness names adopt another group's code interpreter

Harness code-interpreter names drop a trailing code_interpreter suffix and leave out the agent id. list_code_interpreters is account-wide and has no group check. A demo agent:write harness named billing_code_interpreter stored the interpreter id of harness billing in group payments, and DELETE with cleanup_aws deleted that id. GET of the payments agent stayed 403. Labbed only on v1.10.3. AWS was stubbed. The demo admin did not read the other group's agent, and code execution as that group's role was not labbed.

Name
Loom harness names adopt another group's code interpreter
Type
0-day analysis
CVE
n/a
CVE Risk
high
Disclosure Status
public
Vendor
Loom
Affected
Loom for AWS v1.10.3 (cc10ab08573087fa12154f7c8181ffcd985fea88) only. In-group agent:write (g-admins-demo) with a role_arn the caller can bind and a code_interpreter_role_id for a ManagedRole in their own group. Not labbed on v1.9.0.
Published
16 Nov 2026
Updated
16 Nov 2026
Tags
0-day, loom, aws, cwe, cwe-863, harness

billing and billing_code_interpreter are one interpreter

A harness called billing and a harness called billing_code_interpreter are different rows, and they still compute one code-interpreter name.

A demo-group admin who can create agents in their own group, and who can attach a role they are already allowed to use, can pick a harness name that strips down to someone else's interpreter. The new agent stores that existing interpreter id. Deleting the new agent with AWS cleanup turned on then deletes the interpreter. They never open the other group's agent page. I did not show them running code as the other group's role. If the account has more interpreters than one listing page, the latch can miss, because that list is not paged.

Lab files are abraxas/loom-ci-name-adopt. The client is loom-ci-name-adopt-Abraxas-Labs.py. I am @abraxas_null. The product tree is awslabs/loom.

This run is v1.10.3 only, commit cc10ab08573087fa12154f7c8181ffcd985fea88. I am not claiming a v1.9.0 container. I do not have one. The stack listened on 127.0.0.1:18810 and I tore it down after the witness. AWS was a stub. Product Python was not patched.

No CVE from this write-up. CWE-863. 7.6 High (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:H). Privileges are high: agent:write plus a role the caller can bind. Scope changes because the interpreter is account-global and was created for another group. Confidentiality is none. The demo admin cannot read the other group's agent, and the GET body did not contain the interpreter id. Integrity is low, for storing that foreign id on the new row. Availability is high because cleanup deletes the interpreter. I am not scoring code execution, and I am not saying the demo role ran as the payments role. That was not labbed.

How the name is built

Harness create checks uniqueness on the exact Agent.name, and only among rows with source == "harness". The pattern is ^[a-zA-Z][a-zA-Z0-9_]{0,47}$. billing and billing_code_interpreter are both legal, and they are not the same row. Groups do not enter that query. The demo admin still cannot create or delete a row in group payments. They do not need to. They create in demo.

The interpreter name is built in the background deploy. _deploy_harness_background starts at line 2690 of backend/app/routers/agents.py. The block runs only when ci_config carries a non-empty execution_role_arn. Around line 2849:

Python
base_name = re.sub(r"_?code_interpreter$", "", name).strip("_")
raw_ci_name = f"loom_ci_{base_name}"
sanitized_ci_name = re.sub(r"[^a-zA-Z0-9_]", "_", raw_ci_name)[:48]

A trailing code_interpreter, with or without an underscore in front of it, is stripped. The agent id is not in the string. What remains is prefixed with loom_ci_, scrubbed to letters, digits, and underscores, and cut at 48 characters. billing and billing_code_interpreter both become loom_ci_billing. The names are not injective, and they are not per group.

The next call is list_code_interpreters() with no pagination token. The first summary whose name equals that string is stored on the new agent as codeInterpreterId. There is no loom:group check. If nothing matches, create_code_interpreter runs with the caller's role, taken from a ManagedRole in the caller's own group. Reuse does not create. Reuse keeps the existing interpreter, including whatever role it was created with. The lab recorded the reuse. It did not record a call under that role.

list_code_interpreters returning one page is a real limit. A large account can hold the target on a later page. This code would not see it, would create under the caller's role, and would not adopt. The lab account had one summary, loom_ci_billing / ci-billing-existing.

Delete is off by default. cleanup_aws defaults to false. If the flag is false, or if runtime_id is empty, delete returns on the local-only path and does not touch the interpreter. When both are set, the stored id is deleted. That is the path the lab took. A fallback, for a harness row whose stored id is empty, rebuilds the stripped name and deletes the first account-wide summary that matches. I did not take the fallback.

The caller does not need the victim's role. They need agent:write in g-admins-demo, a role_arn they may bind, and a code_interpreter_role_id in their group so execution_role_arn is non-empty and the block runs. The model id on the request was us.amazon.nova-lite-v1:0, only because the harness check wants a model the runtime endpoint accepts. Nothing about that model is the bug.

The NameError that is not the bug

The older plant is closed. v1.10.1 rejects AGENT_CONFIG_JSON and the other managed keys, so a caller can no longer write another group's provider name into an agent. Credential-provider names still include the agent id. This collision is the interpreter name, which never had the id and which strips a suffix.

The first create did not reach AWS. memory_snapshots is rebuilt from memory_records only inside the code_interpreter_role_id branch, and memory_records is bound only inside the memory_ids branch. A role and no memory ids raises NameError. The lab sends memory_ids: [0]. An unknown id yields an empty list, the name is bound, and create continues. That footgun is how the lab gets past a crash. It is not the vulnerability.

Health was 200. Seed: harness billing, id 1, group payments, interpreter ci-billing-existing. GET as the demo admin was 403, and the body did not contain that id. POST billing_code_interpreter was 201, id 2, tag demo. The poll reached READY with that same interpreter id and runtime_id set, because the stub's create_harness returns READY. Product code was unmodified. List returns the billing summary, create records the name, delete appends the id.

POST payroll was 201, id 3, stored ci-created-1, created name loom_ci_payroll. DELETE of id 2 with cleanup_aws=true deleted ci-billing-existing. I did not invoke the interpreter. Calling that "code execution as the payments role" would be a claim the stub never made. Bedrock Guardrails and the ADK approval glob are different sinks.

What an attacker can do

Method Class of impact Lab-proven or inferred
POST /api/agents harness name billing_code_interpreter, caller's role_arn and in-group code_interpreter_role_id, tag demo Integrity: the new row stores ci-billing-existing from the payments harness. Lab-proven. 201, id 2, READY, that id, runtime_id set.
GET /api/agents/1 as the same demo admin No read. Lab-proven. 403, body has no interpreter id.
POST /api/agents name payroll No adopt. Stores ci-created-1, name loom_ci_payroll. Lab-proven negative control.
DELETE /api/agents/2?cleanup_aws=true with runtime_id set Availability: delete is called with ci-billing-existing. Lab-proven. stored-id-deleted=yes.
Delete with cleanup_aws false, or empty runtime_id Local path only. Interpreter stays. Read from the early return. The lab used the flag and a set runtime id.
Fallback delete that rebuilds the name when the stored id is empty Availability, same account-wide summary. Not the lab path.
Run code in the adopted interpreter as the payments role Not shown. Not labbed. AWS was stubbed.
Target sitting past the first list_code_interpreters page Adopt can miss and create instead. Limit of the unpaged call. The lab page held the target.

What stays closed

Surface Why it is not this bug Lab-proven or inferred
CVE-2026-103956, CVE-2026-103957, CVE-2026-103958 Older unauthenticated super-admin, OAuth token disclosure, and MCP/A2A SSRF. Fixed earlier. Not re-filed.
Planting AGENT_CONFIG_JSON Closed in v1.10.1. Not described as open.
Credential-provider delete by planted name Provider names include the agent id. Different sink.
GET or DELETE of the payments agent as demo GET is 403. Demo delete is limited to group demo. GET 403 lab-proven.
Create in group payments The caller tagged demo. Not the path this bug uses.
Base name payroll Stores a new id. Lab-proven.
Bedrock Guardrails, and the ADK tool-name glob Different features. Not this lab.
Code execution under the other group's role The stub never ran a session. Not claimed.

The lab

v1.10.3 only. Loopback 127.0.0.1:18810. Product code unmodified. AWS stubbed as above. Stack torn down after SUCCESS. Health 200. Seed billing id 1, group payments. GET as demo admin 403 without the interpreter id. POST billing_code_interpreter 201 id 2, READY, code_interpreter_id=ci-billing-existing. POST payroll 201 id 3, ci-created-1, created name loom_ci_payroll. DELETE cleanup_aws=true on id 2, deleted ids include ci-billing-existing.

Plain text
LOOM_URL=http://127.0.0.1:18810 python loom-ci-name-adopt-Abraxas-Labs.py
Plain text
SUCCESS LOOM-1103-CI-ADOPT adopted=ci-billing-existing payroll-distinct=yes cleanup-deleted=yes LOOM-1103-CI-ADOPT-WITNESS

The fix

Put the agent id in the interpreter name, and stop stripping a suffix that is itself a legal harness name. billing and billing_code_interpreter should not both compute loom_ci_billing. Check uniqueness of the computed name, not only of Agent.name. On reuse, require the existing summary to carry the caller's loom:group, or refuse to store an id this agent did not create. Paginate list_code_interpreters. On delete, delete an interpreter only when this row created it. Adopting an id and then honoring cleanup_aws is how a demo admin removes another group's sandbox.

Bind memory_records before the role branch reads it, so a create with a code-interpreter role and no memory ids fails clean instead of raising. That is a separate fix. Shipping it does not close the collision.

I am @abraxas_null. Lab files: abraxas/loom-ci-name-adopt. Pin: awslabs/loom cc10ab08573087fa12154f7c8181ffcd985fea88. Deploy entry agents.py line 2690. The strip and the unpaged list are around line 2849.