highCVSS 8.8Vulnerability

GHSA-265w-rf2w-cjh4

### Summary Paperclip contains a privilege escalation vulnerability that allows an attacker with an Agent API key to execute arbitrary OS commands on the Paperclip server host. An attacker with an agent credential can escalate privileges from the agent runtime to the Paperclip server host. The vulnerability occurs because agents are allowed to update their own adapterConfig via the /agents/:id API endpoint. The configuration field adapterConfig.workspaceStrategy.provisionCommand is later executed by the server runtime using: ``` spawn("/bin/sh", ["-c", command]) ``` As a result, an attacker controlling an agent credential can inject arbitrary shell commands which are executed by the Paperclip server during workspace provisioning. This breaks the intended trust boundary between agent runtime configuration and server host execution, allowing a compromised or malicious agent to escalate privileges and run commands on the host system. This vulnerability allows remote code execution on the server host. ### Details #### Rootcause Agent configuration can be modified through the API endpoint: ``` PATCH /api/agents/:id ``` The validation schema allows arbitrary configuration fields: ``` adapterConfig: z.record(z.unknown()) ``` This allows attackers to inject arbitrary keys into the adapter configuration object. Later, during workspace provisioning, the server runtime executes a shell command derived directly from this configuration. Relevant code path: ``` server/src/services/workspace-runtime.ts adapterConfig.workspaceStrategy.provisionCommand ↓ provisionExecutionWorktree() ↓ runWorkspaceCommand(...) ↓ spawn("/bin/sh", ["-c", input.command]) ``` Example logic: ``` const provisionCommand = asString(input.strategy.provisionCommand, "").trim() await runWorkspaceCommand({ command: provisionCommand }) ``` Inside runWorkspaceCommand the command is executed using: ``` spawn(shell, ["-c", input.command]) ``` Because no validation, escaping, or allowlis

Properties

ghsa_id
GHSA-265w-rf2w-cjh4
summary
Paperclip: Privilege Escalation via Agent-Controlled workspaceStrategy.provisionCommand Leading to OS Command Execution
severity
high
cvss_score
8.8
cve_id
GHSA-265w-rf2w-cjh4
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
is_ghsa_only
true
ghsa_published
2026-04-16T22:45:26Z
source_url
https://github.com/advisories/GHSA-265w-rf2w-cjh4
ghsa_updated
2026-04-16T22:45:27Z

Related Entities (4)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]npm/@paperclipai/server

AFFECTS (1)

[Software]npm/@paperclipai/server

HAS_WEAKNESS (1)

[Weakness]Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-265w-rf2w-cjh4 (CVSS 8.8) — Ninja Signal Threat Intelligence | Ninja Signal