/

CVE-2026-119713

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Paperclip Workspaces

CVE-2026-119713

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Paperclip contains an operating system command injection vulnerability in execution workspace configuration. An attacker who holds an agent API key may be able to influence workspace command settings, causing attacker-chosen commands to run as the Paperclip server process when the workspace is archived.

Paperclip contains an operating system command injection vulnerability in execution workspace configuration. An attacker who holds an agent API key may be able to influence workspace command settings, causing attacker-chosen commands to run as the Paperclip server process when the workspace is archived.

Affected context

The issue occurs in Paperclip execution workspaces when command-related fields can be modified through the workspace API and are later passed to a shell during artifact cleanup. Risk depends on the API key's ability to update workspace configuration and on the privileges available to the Paperclip server process.

The issue occurs in Paperclip execution workspaces when command-related fields can be modified through the workspace API and are later passed to a shell during artifact cleanup. Risk depends on the API key's ability to update workspace configuration and on the privileges available to the Paperclip server process.

Exploit preconditions

  • Attack surface: Paperclip's execution workspace API
  • Required access: A valid agent API key with permission to modify the target workspace
  • Trigger point: Workspace archival, when cleanup processing executes configured commands
  • Why exploitation is possible: User-influenced command values are executed through a shell with the server process's operating-system privileges
  • Attack surface: Paperclip's execution workspace API
  • Required access: A valid agent API key with permission to modify the target workspace
  • Trigger point: Workspace archival, when cleanup processing executes configured commands
  • Why exploitation is possible: User-influenced command values are executed through a shell with the server process's operating-system privileges

Why this happens

The vulnerability results from treating API-controlled command configuration as trusted shell input. The application permits command fields to reach a shell execution path without sufficiently separating data from executable instructions, allowing shell metacharacters or attacker-controlled command content to alter process behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

The vulnerability results from treating API-controlled command configuration as trusted shell input. The application permits command fields to reach a shell execution path without sufficiently separating data from executable instructions, allowing shell metacharacters or attacker-controlled command content to alter process behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker could execute arbitrary operating-system commands on the Paperclip server host.
  • The attacker may access, alter, or delete data available to the server process.
  • Compromise could enable credential theft, service disruption, or persistence.
  • The vulnerability could facilitate lateral movement if the process has network access or excessive privileges.
  • An attacker could execute arbitrary operating-system commands on the Paperclip server host.
  • The attacker may access, alter, or delete data available to the server process.
  • Compromise could enable credential theft, service disruption, or persistence.
  • The vulnerability could facilitate lateral movement if the process has network access or excessive privileges.

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation for attacker-influenced values and reducing the trust placed in API-managed command settings.

Common defensive patterns include:

  • Replace shell-based execution with fixed, allowlisted operations and argument arrays.
  • Treat command configuration as untrusted input and reject unexpected values through strict schemas.
  • Separate cleanup behavior from user-controlled workspace fields.
  • Apply strong authorization boundaries to workspace updates and narrowly scope agent API keys.
  • Run the Paperclip service with a dedicated least-privilege account and restricted filesystem and network access.
  • Use isolation controls so cleanup tasks cannot inherit unnecessary host capabilities.

Mitigation generally focuses on eliminating shell interpretation for attacker-influenced values and reducing the trust placed in API-managed command settings.

Common defensive patterns include:

  • Replace shell-based execution with fixed, allowlisted operations and argument arrays.
  • Treat command configuration as untrusted input and reject unexpected values through strict schemas.
  • Separate cleanup behavior from user-controlled workspace fields.
  • Apply strong authorization boundaries to workspace updates and narrowly scope agent API keys.
  • Run the Paperclip service with a dedicated least-privilege account and restricted filesystem and network access.
  • Use isolation controls so cleanup tasks cannot inherit unnecessary host capabilities.

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving shell execution APIs, command concatenation, or dynamically constructed cleanup commands.
  • Code review signals where request fields are assigned to process, shell, or subprocess execution functions.
  • Authorization reviews covering API endpoints that modify executable configuration.
  • Runtime monitoring for unexpected child processes, shell interpreters, or command execution during workspace archival.
  • Policy enforcement that prohibits shell invocation with request-derived values and requires allowlisted executable paths.

Automated application security and code review tools may help identify these patterns when configured for command injection rules.

Organizations can look for:

  • Static analysis findings involving shell execution APIs, command concatenation, or dynamically constructed cleanup commands.
  • Code review signals where request fields are assigned to process, shell, or subprocess execution functions.
  • Authorization reviews covering API endpoints that modify executable configuration.
  • Runtime monitoring for unexpected child processes, shell interpreters, or command execution during workspace archival.
  • Policy enforcement that prohibits shell invocation with request-derived values and requires allowlisted executable paths.

Automated application security and code review tools may help identify these patterns when configured for command injection rules.

Sources

SourceLink
github.comgithub.com/paperclipai/paperclip
github.comgithub.com/paperclipai/paperclip/blob/v2026.403.0/server/src/routes/execution-workspaces.ts
github.comgithub.com/paperclipai/paperclip/commit/32a9165ddf6308f3b46eae0653b6f583e502e538
github.comgithub.com/paperclipai/paperclip/releases/tag/v2026.416.0
github.comgithub.com/paperclipai/paperclip/security/advisories/GHSA-vr7g-88fq-vhq3
vulncheck.comvulncheck.com/advisories/paperclip-2026.403.0-before-2026.416.0-rce-via-execution-workspace-cleanup-commands

Frequently asked

questions

It can be exploitable through the Paperclip API when an attacker possesses an agent API key with sufficient permission to update an execution workspace. The command execution occurs later when the affected workspace is archived.

Not necessarily. The relevant prerequisite is authorization to modify the workspace command settings, although the practical impact depends on the permissions and environment of the API key and server process.

Avoid passing API-controlled values to a shell. Prefer fixed, allowlisted cleanup operations with structured arguments, strict validation, and explicit authorization checks.

Minimize shell usage, separate configuration data from executable behavior, scope API keys narrowly, monitor unexpected child processes, and run services with least privilege and appropriate isolation.

It can be exploitable through the Paperclip API when an attacker possesses an agent API key with sufficient permission to update an execution workspace. The command execution occurs later when the affected workspace is archived.

Not necessarily. The relevant prerequisite is authorization to modify the workspace command settings, although the practical impact depends on the permissions and environment of the API key and server process.

Avoid passing API-controlled values to a shell. Prefer fixed, allowlisted cleanup operations with structured arguments, strict validation, and explicit authorization checks.

Minimize shell usage, separate configuration data from executable behavior, scope API keys narrowly, monitor unexpected child processes, and run services with least privilege and appropriate isolation.

Find out what's already
exploitable in your codebase.