Back to skill

Security audit

file share to filebin.net

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward filebin.net uploader with disclosed public-upload behavior and no persistence or hidden privileges.

Install only if you are comfortable uploading selected workspace files to a public filebin.net URL. Confirm the exact file before upload, avoid private data, and prefer safe process invocation or careful quoting/URL encoding when running the curl command.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:27
Finding
Potential PowerShell Command Injection Through Unvalidated File Path and Filename<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 27–31 **Vulnerability Type**: PowerShell command injection through unsafe value interpolation **Risk Level**: Medium ### Vulnerable Code ```powershell 3. **Upload via curl (PowerShell):** ``` curl -si -X POST -H "Content-Type: application/octet-stream" -T "<FILEPATH>" "https://filebin.net/$binId/<FILENAME>" ``` ``` ### Technical Analysis The Skill instructs the Agent to insert a user-selected file path and filename directly into a PowerShell command. It does not require validation, shell-safe argument passing, or filename URL encoding. Double quotes do not make arbitrary untrusted values safe for PowerShell command construction. If the Agent replaces the placeholders textually and invokes the resulting command through PowerShell, a malicious path or filename containing a double quote and PowerShell syntax could terminate the intended argument and introduce an additional command. The filename is also inserted into a URL path without percent-encoding it as an individual URL component. This can cause malformed requests or unintended URL interpretation even when command injection is not achieved. Exploitation depends on the Agent constructing this command through textual substitution rather than passing the values as discrete arguments to a process-execution API. ### Attack Path 1. An attacker creates, supplies, or directs the Agent to a file whose path or filename contains PowerShell-significant characters. 2. The user asks the Skill to upload that file. 3. The Agent locates the file under `~/.openclaw/workspace/`. 4. The Agent replaces `<FILEPATH>` or `<FILENAME>` in the documented command with the attacker-controlled value. 5. If the replacement value terminates the quoted argument, PowerShell interprets the remaining injected syntax as a command. 6. The injected command executes with the operating-system privileges and accessible resources of the Agent process. ### Impa ...[truncated 483 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not construct a shell command by interpolating the path, filename, bin identifier, or URL into command text. 2. Use a structured process-execution API that invokes `curl` directly with a discrete argument array and does not enable shell evaluation. 3. Resolve the requested file to a canonical path and verify that it: - Is inside the authorized workspace directory. - Is a regular file rather than a directory or unexpected special file. - Is the exact file explicitly selected by the user. 4. Generate the destination URL programmatically and percent-encode the filename as one URL path segment. 5. Validate the generated bin identifier against the documented length and character requirements. 6. If PowerShell invocation is unavoidable, pass values through parameters as literal data rather than inserting them into a command string. Reject control characters and filenames that cannot be represented safely. 7. Preserve the existing warning that filebin.net uploads are public, and require explicit user confirmation before uploading potentially sensitive files. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.