Back to skill

Security audit

CF Share

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but it can publish local files or services to the internet and includes automatic system-level install steps for network-downloaded tools.

Install only if you intentionally want agents to create public links to local services or files. Prefer token or basic access, avoid access none for anything private, review the exact files or port before exposing them, and install cloudflared/cfshare yourself from trusted, pinned, verified sources rather than allowing automatic sudo or global install steps.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
SKILL.md:43
Finding
Unverified Mutable Binary Installed into a Trusted System Path## Vulnerability Details **File Location**: `SKILL.md`, lines 43–48 **Vulnerability Type**: Unverified third-party binary installation **Risk Level**: High ### Vulnerable Code ```bash WSL/Linux generic binary install: ```bash curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared sudo chmod +x /usr/local/bin/cloudflared ``` ``` ### Technical Analysis The installation procedure retrieves the `cloudflared` executable from a mutable `latest` release URL and places it directly into the trusted system executable directory `/usr/local/bin`. It does not pin an explicit version or validate the downloaded artifact using a cryptographic checksum or signature. HTTPS authenticates the transport endpoint but does not independently establish the integrity and provenance of the delivered executable. The effective payload may change after the Skill has been reviewed whenever the upstream `latest` release changes. Compromise of the upstream release process, repository account, release artifact, or delivery infrastructure could consequently substitute a malicious executable. The instructions then make the downloaded file executable. Later operations described by the Skill invoke `cloudflared`, causing the substituted payload to execute. Writing directly to `/usr/local/bin` also risks leaving an incomplete or corrupted executable if the transfer is interrupted. On systems where that directory is not writable by the current user, the download command will fail; the dangerous installation path applies when the command is run with sufficient permissions or the directory is otherwise writable. ### Attack Path 1. An attacker compromises or influences the upstream release artifact, associated release account, redirect destination, or delivery path. 2. The mutable `latest` URL begins serving an attacker-controlled `cloudflared-linux-amd64` payload. 3. A user or agen ...[truncated 1223 chars]
Remediation
## Remediation Suggestions 1. Pin `cloudflared` to an explicitly reviewed version instead of using the mutable `latest` URL. 2. Download the executable and its official checksum or signature into a newly created temporary directory. 3. Verify the artifact with a cryptographically authenticated checksum or vendor signing key before making it executable. 4. Abort installation on any download, signature, checksum, ownership, or permission failure. 5. Install only the verified temporary artifact using a privileged, atomic operation such as `sudo install`, rather than downloading directly into `/usr/local/bin`. 6. Ensure the destination is owned by `root` and is not writable by unprivileged users. 7. Prefer Cloudflare's authenticated platform package repository where available, while retaining explicit version controls where reproducible installation is required. 8. Re-run `cloudflared --version` after installation and verify that the reported version exactly matches the pinned version. Example hardened flow: ```bash set -euo pipefail version='PINNED_REVIEWED_VERSION' tmp_dir="$(mktemp -d)" trap 'rm -rf "$tmp_dir"' EXIT curl --fail --silent --show-error --location \ "https://github.com/cloudflare/cloudflared/releases/download/${version}/cloudflared-linux-amd64" \ --output "$tmp_dir/cloudflared" curl --fail --silent --show-error --location \ "https://github.com/cloudflare/cloudflared/releases/download/${version}/cloudflared-linux-amd64.sha256" \ --output "$tmp_dir/cloudflared.sha256" ( cd "$tmp_dir" sha256sum --check cloudflared.sha256 ) sudo install -o root -g root -m 0755 \ "$tmp_dir/cloudflared" /usr/local/bin/cloudflared cloudflared --version ``` The exact checksum filename and verification mechanism should follow the artifacts officially published for the pinned Cloudflare release. If vendor signatures are available, signature verification should be preferred or used in addition to chec ...[truncated 18 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (13)

Missing User Warnings

High
Confidence
98% confidence
Finding
The documentation does not prominently warn that using the skill exposes local services or files to public internet URLs, potentially making internal resources reachable by outsiders. In this context, absent warnings are especially dangerous because the tool's whole function is network publication, and users may underestimate the confidentiality and access-control implications.

Credential Access

High
Category
Privilege Escalation
Content
Debian/Ubuntu:

```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
Debian/Ubuntu:

```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Chaining Abuse

High
Category
Tool Misuse
Content
Debian/Ubuntu:

```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
Debian/Ubuntu:

```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```

Windows (PowerShell):
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
- `cloudflared binary not found`: install `cloudflared` or set `--config '{"cloudflaredPath":"..."}'`
- `local service is not reachable on 127.0.0.1:<port>`: start service first
- `path blocked by ignore policy`: adjust `policy.ignore` or `maintenance set_policy`
- `port blocked by policy`: update `blockedPorts` in policy if intentional

Use `CFSHARE_LOG_LEVEL=info` or `CFSHARE_LOG_LEVEL=debug` for more stderr logs.
Confidence
90% confidence
Finding
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger description is broad enough to activate on common requests involving public URLs, file sharing, or exporting state, which increases the chance the skill will run in situations the user did not intend. Because this skill can expose local resources to the public internet, over-triggering materially raises the risk of accidental data exposure.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill instructs the agent to perform system-wide installation of software, including privileged package management and direct binary placement, even though its primary purpose is sharing local ports/files. That broadens the trust boundary significantly: a user asking for a temporary share link could trigger persistent host modifications and execution of newly downloaded code.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
Debian/Ubuntu:

```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```
Confidence
95% confidence
Finding
This line pipes downloaded repository key material into a privileged write under sudo, causing system-level changes during normal skill use. Combining network retrieval with elevated execution creates unnecessary risk for a sharing tool and could be abused if the source, transport, or invocation context is compromised.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```
Confidence
95% confidence
Finding
This command writes a new apt source definition into a privileged system directory using sudo, modifying the host's package trust and update behavior. Such persistent privileged changes exceed the minimum needed for the skill's purpose and increase attack surface if triggered unexpectedly.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
```

Windows (PowerShell):
Confidence
91% confidence
Finding
Running apt-get update and install under sudo executes a privileged package installation path as part of ordinary skill operation. For a skill that may be auto-triggered from broad sharing-related requests, this creates an avoidable risk of host modification and unintended software installation.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared
sudo chmod +x /usr/local/bin/cloudflared
```

3. Re-run both version checks. If still failing, stop and report exact stderr output to user.
Confidence
88% confidence
Finding
Marking a downloaded binary executable in /usr/local/bin using sudo is a privileged host modification tied to network-fetched content. Even if intended as convenience, it expands the consequences of a simple sharing request into permanent system changes and trusted code execution.

Static analysis

No suspicious patterns detected.