GHSA-3pw3-v88x-xj24: Paperclip: Arbitrary File Read via Agent-Controlled adapterConfig.instructionsFilePath
SummaryPaperclip contains an arbitrary file read vulnerability that allows an attacker with an Agent API key to read files from the Paperclip server host filesystem.
The vulnerability occurs because agents are allowed to modify their own adapterConfig through the /agents/:id API endpoint.
The configuration field adapterConfig.instructionsFilePath is later read directly by the server runtime using fs.readFile().
Because no validation or path restriction is applied, an attacker can supply an arbitrary filesystem path.
The Paperclip server then attempts to read that path from the host filesystem during agent execution.
This breaks the intended trust boundary between agent runtime configuration and server host filesystem access, allowing a compromised or malicious agent to access sensitive files on the host system.DetailsRoot CauseNo path normalization, allowlist, or workspace boundary validation is applied before the filesystem read occurs.
Agent configuration can be modified through the API endpoint:The validation schema allows arbitrary configuration fields inside adapterConfig.
File:Schema fragment:Because of this schema, attackers can inject arbitrary configuration values, including:During agent execution, the server runtime reads this path directly from the host filesystem using fs.readFile().
Relevant code path:Execution flow:Vulnerable logic:Because the value originates from attacker-controlled configuration and no validation or sandboxing is applied, this becomes a direct host filesystem read primitive.Affected FilesPrimary vulnerable file:Relevant function:Sensitive operation:Configuration source:Validation logic:Attacker ModelRequired privileges
Attacker requires:Agent credentials are intended for automation and integration with external runtimes.
These credentials are commonly used by:Agent credentials are not intended to grant direct access to the server host filesystem.
No board or administrator privileges are required.Attacker ChainComplete exploit chain:This allows an attacker to read arbitrary files accessible to the Paperclip server process.Trust Boundary ViolationPaperclip’s architecture assumes the following separation:This allows an agent to access files outside its intended permission scope.Why This Is a Vulnerability (Not Expected Behavior)The instructionsFilePath configuration appears intended for trusted operators configuring agent runtime behavior.
However, the current API design allows agents themselves to modify this configuration through the agent API.
Because agent credentials may be exposed to external systems or runtime environments, allowing them to control server filesystem paths introduces a security vulnerability.
Therefore:The issue arises from insufficient separation between configuration authority and filesystem access authority.PoCThe following PoC demonstrates that the server attempts to read an attacker-controlled filesystem path.
To avoid accessing sensitive data, the PoC uses a non-existent path.Step 1 — Setup EnvironmentRun server:Login Claude:Step 2 — Obtain Agent API keyCreate an agent via the UI or CLI and obtain its API key.
Example:
<img width="1475" height="710" alt="image" src="https://github.com/user-attachments/assets/fcc0dfe9-1271-4eed-af0a-7dd83dfa9ad4" />Step 3 — Identify agent IDStep 4 — Inject malicious configurationPayload example:Example PowerShell payload:Step 5 — Trigger executionStep 6 — Observe server logServer log shows:This confirms the server attempted to read an attacker-controlled filesystem path.
<img width="1916" height="166" alt="image" src="https://github.com/user-attachments/assets/2470438a-bf5a-4f6f-848c-b134d3f0cc3f" />ImpactSuccessful exploitation allows attackers to read sensitive files accessible to the Paperclip server process.
Examples of potentially exposed data include:Possible attacker actions:Because Paperclip orchestrates repositories, agents, and automation tasks, disclosure of such secrets may lead to compromise of the broader deployment environment.Recommended FixRestrict configuration authorityAgents should not be allowed to modify filesystem-sensitive configuration fields.
Example mitigation:should only be configurable by board/admin actors.Path validationRestrict file access to a safe directory such as:Reject:Avoid direct filesystem reads from configurationInstead of:use:Example guardSecurity Impact StatementAn authenticated attacker with an Agent API key can modify their agent configuration to inject an arbitrary filesystem path into adapterConfig.instructionsFilePath.
The Paperclip server reads this path during agent execution via fs.readFile, allowing the attacker to access files on the server host filesystem.DisclosureThis vulnerability was discovered during security research on the Paperclip orchestration runtime and is reported privately to allow maintainers to patch the issue before public disclosure.
CVSS v3.1: 6.5